ggordon
Programmer
- Sep 15, 2003
- 45
I had a drop down (select) form (to send a user to a URL based on their selection) that was working perfectly fine for HTML Transitional.
Now I have to have it working using getElementByID since XHTML (Strict) doesn't allow for "name." I need to use "id" when identifying form elements.
So, .. I have this .. and I don't know how to get this coded properly so it will work in Netscape 4.79. If anyone could shed some specific light on what I need to change so it will work .. I'd greatly appreciate it.
Previous (using NAME for the form elements):
<input type="button" onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">");
Now ... I have everything basically the same .. but need to know how to recode this using getElementById so it will work.
I changed the tags in the Select form from "name=" to "id=" .. and tried ...
<input type="button" onClick="location=document.getElementById('jump').menu.options[document.getElementById('jump').menu.selectedIndex].value;" value="GO">");
This did not work.
I hope someone can tell me what to do.
If you need more details on the form, please let me know.
Thanks ...
Gary
Now I have to have it working using getElementByID since XHTML (Strict) doesn't allow for "name." I need to use "id" when identifying form elements.
So, .. I have this .. and I don't know how to get this coded properly so it will work in Netscape 4.79. If anyone could shed some specific light on what I need to change so it will work .. I'd greatly appreciate it.
Previous (using NAME for the form elements):
<input type="button" onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">");
Now ... I have everything basically the same .. but need to know how to recode this using getElementById so it will work.
I changed the tags in the Select form from "name=" to "id=" .. and tried ...
<input type="button" onClick="location=document.getElementById('jump').menu.options[document.getElementById('jump').menu.selectedIndex].value;" value="GO">");
This did not work.
I hope someone can tell me what to do.
If you need more details on the form, please let me know.
Thanks ...
Gary