Just want to take information a user selects in a form and either save it of print it on the client side. any help would be greatly appreciated. This is what I have pieced together so far...
HTML Code:<html> <head> <Script language= "Javascript"> <!-- var anxiety= new Array() anxiety[0]="No"; anxiety[1]="mild"; anxiety[2]="Moderate"; anxiety[3]="High"; anxiety[4]="affected by substance use or abuse"; //--> var anxietyprint="not assessed"; function set_anxiety() { } </script> <script language=text/javascript"> function assign_value() { if (anxiety.value=="no") { anxietyprint='Client presented with no anxiety'; } else if (anxiety.value=="mild") { anxietyprint='Client presented with mild anxiety'; } else if (anxiety.value=='moderate') { anxietyprint="Client presented with moderate anxiety"; } else if (anxiety.value=='high') { anxietyprint="Client presented with high anxiety"; } else if (anxiety.value=='affected') { anxietyprint="Client presented with anxiety affected by substance use or abuse"; } { document.write(anxietyprint); } } </script> <P> </head> <body> <FORM name="anxiety"> Level of anxiety noted:<br> <input type="radio" name="anx" value="no" /> NO<br /> <input type="radio" name="anx" value="mild" />MILD<br /> <input type="radio" name="anx" value="moderate" />MODERATE<br /> <input type="radio" name="anx" value="high" />HIGH<br /> <input type="radio" name="anx" value="affected" />AFFECTED BY SUBSTANCE USE<br /> </form> <button type="button" onClick="assign_value()">Assign Anxiety</button> </body>


Reply With Quote

Bookmarks