Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
As I already told you in a previous question, you cannot use the .value property on a select id directly. You have to go through the "options" array.
This is the correct way:
Code:
current_value=document.getElementById('inpcity').options[document.getElementById('inpcity').selectedIndex].value
Or shorter:
Code:
sel=document.getElementById('inpcity')
current_value=sel.options[sel.selectedIndex].value
Just like on the line above the if statement (which something I gave you previously, if I remember right)...
__________________
Only a biker knows why a dog sticks his head out the window.
Last edited by tripy; 02-19-2010 at 02:36 AM..
|