473,770 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Newbie needs asp help

2 New Member
Project to do simulation testing (me teacher). Page one writes in real time to page two...both displayed at sam time with frames. Code below. Problem...I want to keep score. Each choice needs a value between (-3 and 3) to be summed for final score. second problem, I want checkbox to be permanent, that is once selected no unselect. Thanks fro your help. also, all on a windows server asp willing to go with php, java etc.


Page one code........

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <base target="main">
  3.  
  4. <%
  5. dim dmaking
  6. dmaking=Request.Form("dmaking")
  7. %>
  8. <body>
  9. <form action="ben2.asp" method="post">
  10. <p>Which measures do you wish to assess?</p>
  11.  
  12. <input type="checkbox" name="dmaking" value="40 breaths per minute" onclick="this.form.submit();">Respiratory Rate
  13. <br />
  14.  
  15.  
  16. <input type="checkbox" name="dmaking" value="</br> 200/140" onclick="this.form.submit();">Blood Pressure
  17. <br />
  18.  
  19.  
  20. <input type="checkbox" name="dmaking" value="</br> 188 beats per minute" onclick="this.form.submit();">Heart rate
  21.  
  22. <br />
  23.  
  24. <input type="checkbox" name="dmaking" value="</br> Blue"  onclick="this.form.submit();">Color
  25.  
  26. <br />
  27.  
  28. <input type="checkbox" name="dmaking" value="</br> Doctor disagrees"  onclick="this.form.submit();">Cat Scan
  29.  
  30. <br />
  31.  
  32. <input type="checkbox" name="dmaking" value="</br> Doctor disagrees"  onclick="this.form.submit();">Brain surgery 
  33.  
  34. <p> 
  35.  
  36. <br />
  37.  
  38. <a target="_self" href="#section2">click here to go to section 2</a> </p>
  39.  
  40. <p>&nbsp;</p>
  41.  
  42.  
  43. <p>&nbsp;</p>
  44.  
  45.  
  46. <p>&nbsp;</p>
  47.  
  48.  
  49. <p>&nbsp;</p>
  50.  
  51.  
  52. <p>&nbsp;</p>
  53.  
  54.  
  55. <p>&nbsp;</p>
  56.  
  57.  
  58. <p>&nbsp;</p>
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. <a name="section2"> Welcome To the next Section 2</a>
  66.  
  67.  
  68.  
  69. <p>Which intervention is most appropriate?</p>
  70.  
  71. <p>Select only one unless instructed to choose another.</p>
  72.  
  73. <input type="checkbox" name="infogathering" value="Doctor disagrees Nasal canula not ordered" onclick="this.form.submit();">Nasal Canual
  74. <br />
  75.  
  76.  
  77. <input type="checkbox" name="infogathering" value="<br /> Doctor disagrees Non rebreathing Mask not ordered" onclick="this.form.submit();">Non rebreathing Mask
  78. <br />
  79.  
  80.  
  81. <input type="checkbox" name="infogathering" value="<br /> Non rebreathing Mask" onclick="this.form.submit();">Heart rate
  82.  
  83. <br />
  84.  
  85. <input type="checkbox" name="infogathering" value="<br /> Doctor just left the building"  onclick="this.form.submit();">Send to real hospital
  86.  
  87. <br />
  88.  
  89. <input type="checkbox" name="infogathering" value="<br /> Doctor disagrees dip stick"  onclick="this.form.submit();"> Bronchodialator therapy
  90.  
  91. <br />
  92.  
  93. <input type="checkbox" name="infogathering" value="<br /> Doctor disagrees Brain surgery just plain stupid"  onclick="this.form.submit();">Brain surgery 
  94.  
  95. <br />
  96.  
  97.  
  98. <%
  99. if dmaking<>"" then
  100. Response.Write("<p> " & dmaking & "</p>")
  101. end if
  102. %>
  103.  
  104. </form>
  105. &nbsp;</body></html>



Page two...........
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <meta http-equiv="Content-Language" content="en-us">
  3.  
  4. <%
  5. dim infogathering
  6. infogathering=Request.Form("infogathering")
  7. %>
  8.  
  9. <%
  10. dim dmaking
  11. dmaking=Request.Form("dmaking")
  12. %>
  13.  
  14. <body>
  15.  
  16. <p>Responses to your choices:</p>
  17. <%
  18. if infogathering<>"" then
  19. Response.Write("<p> " & infogathering & "</p>")
  20. end if
  21.  
  22. if dmaking<>"" then
  23. Response.Write("<p> " & dmaking & "</p>")
  24. end if
  25. %>
  26.  
  27. </body>
  28. </html>
Nov 18 '08 #1
3 1886
jhardman
3,406 Recognized Expert Specialist
So which part is giving you trouble? coding frames? Picking the technology to code the page in the first place? ASP is a fair choice for this project, but you will need some javascript to go along with it.

BTW, when you post code, please use [ code]...[/code] tags (you can use the # button on the post page)

Jared
Nov 19 '08 #2
milov
2 New Member
Thanks for taking the time to reply. The pages work fine except I don't know how to make checkbox once checked permanent (until simulation run again) and I don't know how to get the variable to have a numeric value and then how to sum those values at the with a final submit at the bottom of page one. Thanks for the tip on posting code.
Nov 19 '08 #3
jhardman
3,406 Recognized Expert Specialist
Thanks for taking the time to reply. The pages work fine except I don't know how to make checkbox once checked permanent (until simulation run again) and I don't know how to get the variable to have a numeric value and then how to sum those values at the with a final submit at the bottom of page one. Thanks for the tip on posting code.
For the first, I would use javascript. I think I could get it to work, but I'm not really a javascript expert, so I'm not sure I would take my advice, but it goes something like this:
Expand|Select|Wrap|Line Numbers
  1. <input type="checkbox" name="thisCheckBox" onClick="this.Disabled='true'">
This could get you started, but it would probably be better to have the onclick attribute go to a stand-alone function that disables the checkbox. If that is something you need help with, please ask. If I can't get it to work for you, I can probably recommend someone else to do it.

For the second question, I'm still not sure I understand you. Is this something you want the web page to calculate before you submit the page? If so, it can all be done with javascript. Each checkbox clicked would pass a value to a javascript function, the function passes the number to a variable and when you submit, the submit sends that value to the form handler. Does this make sense?

ASP really only works while the page is loading. If you want the totalling to be done after submitting (and there would be no way for users to find your code) then you should use ASP for that part. Each checkbox selected passes its value attribute on to the form handler. Does this make sense?

Jared
Nov 19 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1305
by: igmox | last post by:
hi, i am a complete newbie and got stuck. my question is about costumers and prices Customer_ID CustomerName CustomerType 1 John 2 2 Joe 3 3 Mary 2 4 Nicky 1 5 Steve 3 and prices like:
0
1423
by: Statsstudent2006 | last post by:
Hello! I am a newbie, and have received my first VBA assignment. I have to write a subroutine that generates the Fibonacci sequence of numbers (the first n numbers, where n is an integer number that the user inputs). For example, the first seven numbers will be 0,1,1,2,3,5,8). I also have to write a subroutine that generates Pascal's triangle (the first n rows, where n is an integer number that the user inputs). For example, the first...
2
1439
by: Paul Revere | last post by:
Hi, all of you! I am new to this community. I am a web designer and a friend of mine and I have a server and manage websites (mostly ours but also a few clients). I manage the sites and he does the database management. My friend, an expert at javascript and java programming, is burning out on programming and he doesn't want to do it anymore. I'm stuck, on my own. So ... now I have to learn PHP (can't use CGI) and database management. I...
23
2854
by: Gunnerman6875 | last post by:
Hi everyone, Well I'm a newbie to Access and your site so forgive me if my terminology is a little out. I'm currently trying to create what i thought would be a simple database for work. I'm in the British RAF and I'm currently in charge of the training cell at our Training Depot. Heres my problem, one of the tasks within my job role is to manage 3000+ training publications. These are signed out to instructors in various numbers, however i...
8
1723
by: karokat | last post by:
Hi, I want to learn how to program and python seems to be the most intuitive language according to various internet sources - but I'm not sure if it's best for newbies... please advise.. Anyway, my first project I would like to make is a simple proggie - a simple note 'library', with basic formattable text, to store, edit and access my notes. Express Notes is the prog I currently use but there's things in it I want to customise to my personal...
3
1484
by: donchoi | last post by:
Hi, newbie here, sorry. I have a couple of basic Python questions. 1) How do I open 'datafile' and skip to the ith line for reading? I have a loop counter i for this purpose. The data file is very long, and I'd like to read just 100 lines in at a time or so. 2) Is there any easy way to determine the length of a text file (in lines) besides opening the file, reading each line and using a counter?
6
1063
by: diediealldie | last post by:
I'm really really newbie, almost no knowledge about python. The problem I have is : example) a = for n in a: if a < 4: del a if I code like this, an error occurs, because the number of elements is changed.
11
1507
by: itgetsharder | last post by:
can anyone help me? code errors! -------------------------------------------------------------------------------- im creating a code for a printer. the question i am trying to answer is : MyPrinter needs some printing methods. The first, signature: public boolean printOne(String text) {} should take a String as a parameter, and output it on a single line to the terminal window. It should also increment (add 1 to) the total number...
2
1188
by: Luis Speciale | last post by:
Hi I'm trying to build mod_pyton on Leopard 10.5.4 on a Mac G5 with this cvs version http://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk with this Python python Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9453
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10254
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7451
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.