Ok after fighting with this for a while I've finally distilled this down to the very basics.
I've got a select box, and a javascript alert that pops up the value of the select box. That's it. Works fine, except in IE.
Though stripping down a page to nothing then adding things back one by one to figure out what was causing it, I found that if I ad a form tag it mucks things up in IE for a reason I can't fathom, but I'm not a web programmer.
Anyway here's the code for the page:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head></head>
<body>
Hello!<br/>
Outside Form: <select name="test1" id="test1" >
<option value="One" >One</option>
<option value="Two" >Two</option>
</select><br/>
<br/>
<form>
Inside Form: <select name="test2" id="test2" >
<option value="One" >One</option>
<option value="Two" >Two</option>
</select>
<a href="javascript:alert(test2.value);">Add1</a>
</form><br/>
Outside Form:
<a href="javascript:alert(test1.value);">Add2</a>
</body>
If you click the Add2 link it pops up the value of test1 fine. If you click the Add1 link it doesn't work, and console says "SCRIPT5009: 'test2' is undefined".
Except it's right there.
Works fine in Firefox and Chrome, but not in IE9.
Am I doing something wrong and Chrome/Firefox is just covering for it? Is there a more verbose way to address test2 that I'm missing?