Form in a form?

liunx

Guest
Hello all,<br />
I am wondering if it's possible to have radio buttons drive what shows up in a drop down list? Or, when the radio button is selected a drop down list specific to that button appears immediately to the right of the radio button. Any ideas? Thoughts?<br />
<br />
Thanks for your time.<br />
<br />
Tom<!--content-->well sorta... but its not just going to go boom and appear like an image roll over or something. It will cause the page to reload.<!--content-->It's okay if that page reloads. I found a similar post...so I think...<br />
<br />
I'd like to do something like this with numerous options, but with a drop down list instead of a text box.<br />
<br />
<html><br />
<head><br />
<title>Checkbox Demo</title><br />
<br />
<script language="javascript" type="text/javascript"><br />
<br />
function showhide(frm) {<br />
if (frm.mycheckbox.checked == true) {<br />
document.getElementById("mytext").style.visibility = "visible";<br />
}<br />
else {<br />
document.getElementById("mytext").style.visibility = "hidden";<br />
}<br />
}<br />
<br />
</script><br />
</head><br />
<br />
<body><br />
<form name="myform"><br />
<input name="mycheckbox" type="checkbox" value="shown" onClick="showhide(this.form)" checked><br />
<input id="mytext" name="mytext" type="text"><br />
</form><br />
</body><br />
</html><br />
<br />
Thanks again!<br />
<br />
Tom<!--content-->oh humm... it might not refresh with java script... So you just want something where you check the check box and then a combo apprears correct? I am not much of a java script scolar, I only use it when I absulutly need it and I dont like doing client side scripting of that nature very much because it tends to lag the site up for 56k users. But, if that script can do it, what is your question now?<!--content-->Something like this...but I think this needs help becuase I only want the drop down to appear if the box is checked...which is why I'd rather use radio buttons...<br />
<br />
<html><br />
<head><br />
<script language="javascript" type="text/javascript"><br />
<br />
function showhide(frm) {<br />
if (frm.mycheckbox.checked == true) {<br />
document.getElementById("myjumpbox").style.visibility = "visible";<br />
}<br />
else {<br />
document.getElementById("myjumpbox").style.visibility = "hidden";<br />
}<br />
}<br />
<br />
</script><br />
<script language="javascript" type="text/javascript"><br />
function showhide2(frm2) {<br />
if (frm2.mycheckbox2.checked == true) {<br />
document.getElementById("myjumpbox2").style.visibility = "visible";<br />
}<br />
else {<br />
document.getElementById("myjumpbox2").style.visibility = "hidden";<br />
}<br />
}<br />
<br />
</script><br />
</head><br />
<br />
<body><br />
<form name="myform"><br />
<input name="mycheckbox" type="checkbox" value="shown" onClick="showhide(this.form)" <br />
<br />
checked>Office<form name="jump"><br />
<select name="myjumpbox"<br />
OnChange="window.open(jump.myjumpbox.options[selectedIndex].value)"><br />
<option selected>Please Select...<br />
<option value="http://www.davesite.com/">davesite.com<br />
<option value="http://www.neonlollipops.com/">neonlollipops.com<br />
<option value="http://www.about.com/">about.com<br />
</select><br />
</form><br />
</form><br />
<br />
<form name="myform2"><br />
<input name="mycheckbox2" type="checkbox" value="shown" onClick="showhide2(this.form)">Dept <br />
<br />
<form name="jump2"><br />
<select name="myjumpbox2"<br />
OnChange="window.open(jump2.myjumpbox2.options[selectedIndex].value)"><br />
<option selected>Please Select...<br />
<option value="http://www.davesite.com/">davesite.com<br />
<option value="http://www.neonlollipops.com/">neonlollipops.com<br />
<option value="http://www.about.com/">about.com<br />
</select><br />
</form><br />
</form><br />
</body><br />
</html><!--content-->are the values in the drop down box pre determined?<!--content-->Yes.<!--content-->give me few mins..:D<!--content-->Thank you thank you!!<!--content-->Check this link out..<br />
<!-- m --><a class="postlink" href="http://68.145.35.86/skills/javascripts/DropdownListDisplayRadioSelection.html">http://68.145.35.86/skills/javascripts/ ... ction.html</a><!-- m --><!--content-->Very cool! Thanks so much! Lots o'code! Wow!<br />
<br />
But...very cool...just what I needed! Thanks again!<br />
<br />
Tom<!--content-->you are welcome....<br />
<br />
:D<!--content-->One more question, if I may...<br />
<br />
How do I get the page to open in a new window when a specific value is selected from any of the three lists. Say, for example, that I choose Canada from the list and when that happens, it opens in a new window and takes me to <!-- m --><a class="postlink" href="http://www.canada.com">http://www.canada.com</a><!-- m --> or when I choose U.S.A. it opens in a new window and takes me to <!-- m --><a class="postlink" href="http://www.usa.org">http://www.usa.org</a><!-- m -->, etc...you get the idea...<br />
<br />
Thanks again, you've been a tremendous help!<br />
<br />
Tom<!--content-->Use onChange() in the select box to activate the popup window:<br />
<br />
<script language="javascript"><br />
function openFile(jsVar)<br />
{<br />
window.open(jsVar, "File", "toolbars=no, scrollbars=yes, height=500, width=640, resizable=yes, left=50, top=50");<br />
}<br />
</script><br />
<br />
<br />
<select name="doodah" onChange="openFile(this.value);"><br />
<option value="" selected>--Select--</option><br />
<option value="canada.asp">Canada</option><br />
</select><!--content-->Works great! Thanks again! I am really happy that I found this forum. You guys rock!<br />
<br />
Tom<!--content-->Khalid,<br />
<br />
Is there a way to load these arrays in your example at <!-- m --><a class="postlink" href="http://68.145.35.86/skills/javascripts/DropdownListDisplayRadioSelection.html">http://68.145.35.86/skills/javascripts/ ... ction.html</a><!-- m --> from a .txt file? If so, please share. :)<br />
<br />
Thanks again for all your help!!<br />
<br />
Tom<!--content-->
 
Back
Top