FJbrian
07-04-2007, 01:40 PM
here's 6 lines of code
var x=document.getElementById("whatever")
alert(x.options[x.selectedIndex].text)
var teamgrab= x.options[x.selectedIndex].text;
googleurl= googleurl + teamgrab.value;
alert(googleurl);
first line grabs the form info fine
next line alerts me with the proper value
The 3rd line gives me an "undefined" value when I use alert to check it's value.
I've tried what I think is every combination of parenthesis and brackets and.....grrr I can't figure out where my mistake is.
Could someone please rewrite line 3 correctly
var x=document.getElementById("whatever")
alert(x.options[x.selectedIndex].text)
var teamgrab= x.options[x.selectedIndex].text;
googleurl= googleurl + teamgrab.value;
alert(googleurl);
first line grabs the form info fine
next line alerts me with the proper value
The 3rd line gives me an "undefined" value when I use alert to check it's value.
I've tried what I think is every combination of parenthesis and brackets and.....grrr I can't figure out where my mistake is.
Could someone please rewrite line 3 correctly