|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm having problems getting data out of a drop down menu <select> using Navigator 4.7
I keep getting 'null' as the value, reguardless of which item in the list I choose. This doesn't happen in IE. Here is some sample code. Try it out in IE and Navigator to see what I mean. <html> <form name="form1" > <p> <select name="days" onChange="display()"> <option value="monday" selected>monday</option> <option value="tuesday">tuesday</option> <option value="wednesday">wednesday</option> <option value="thursday">thursday</option> </select> </p> <p> <input type="text" name="answer"> </p> </form> </body> <script language="Javascript"> function display(){ document.form1.answer.value=document.form1.days.value; } </script> </html> Any thought would be greatly appreciated. Jonathan |
|
#2
|
|||
|
|||
|
document conventions for ie and netscape are different...look at this code to view layers
function show(id) { if (document.layers) document.layers[id].visibility = "show" else if (document.all) document.all[id].style.visibility = "visible" } function hide(id) { if (document.layers) document.layers[id].visibility = "hide" else if (document.all) document.all[id].style.visibility = "hidden" } |
|
#3
|
|||
|
|||
|
IE allows syntax incorrect shortcuts which often confuse new scripters. Try:
function display(){ document.form1.answer.value=document.form1.days.options[document.form1.days.selectedIndex].value; } ------------------ Jason****Contact Me Moderator @ www.wsabstract.com Javascript Request and Installation Help forum |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > drop down menu problems with netscape |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|