|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
form/javascript problem
I have this piece of code which works fine in IE, but not in NS (suprise suprise)
What it is supposed to do is once you choose an option from the select box it should direct you to another page at the <a name> reference. Netscape takes you only to the top of the page. here is the code: <FORM action="index.html" method="get" name="form1"> <SELECT name=menu1 language=javascript onChange="document.form1.action=this.options[this.selectedIndex].value;document.form1.submit();"> <option value="h.html#_section1">Introduction</option> <option value="h.html#_section2">Personal Details</option> <option value="h.html#_section3">Change of Details</option> <option value="h.html#_section4">Induction Arrangements</option> </select> </form> Thank you wabirdman
__________________
Real programmers code in binary |
|
#2
|
|||
|
|||
|
Not a great idea, using a form submission for a re-direct like this. Try:
<form> <select onchange="window.location=this[this.selectedIndex].value"> Interesting:<SELECT ..... language=javascript > |
|
#3
|
|||
|
|||
|
Thanks - I did end up working it out
I used this onChange="location.href=this.options[this.selectedIndex].value" cheers wabirdman |
![]() |
| Viewing: Dev Shed Forums > Web Design > JavaScript Development > form/javascript problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|