T
Tony
I have a select with an onchange - it works find in Firefox, but in IE
6 I get an error: Object Expected.
I have simplified things drastically, and still get the error.
The HTML:
<select name="viewtrain" id="viewtrain" onchange="viewDetails(this);">
<option value="1">Train 1</option>
<option value="2">Train 2</option>
<option value="3">Train 3</option>
</select>
and the javascript:
function viewDetails(sel)
{
alert('hi');
}
For some reason, this fails. But if I replace viewDetails with an
alert:
<select name="viewtrain" id="viewtrain" onchange="alert(this);">
everything works correctly.
For some reason, it seems that IE isn't 'seeing' viewDetails.
-
OK I did a bit more checking before posting, and it seems that the js
file isn't loading at all - but only in IE. I can't imagine why.
here's the source:
<script type="text/javascript" src="js/CalendarPopup.js"></script>
<script type="text/javascript" src="js/details.js"></script>
<script type="text/javascript">
ACTIVE_SECTION = 'Late Trains Details';
</script>
The stuff before and after works fine. Only details.js is not loading
- and only in IE.
I'm stumped on this one...
6 I get an error: Object Expected.
I have simplified things drastically, and still get the error.
The HTML:
<select name="viewtrain" id="viewtrain" onchange="viewDetails(this);">
<option value="1">Train 1</option>
<option value="2">Train 2</option>
<option value="3">Train 3</option>
</select>
and the javascript:
function viewDetails(sel)
{
alert('hi');
}
For some reason, this fails. But if I replace viewDetails with an
alert:
<select name="viewtrain" id="viewtrain" onchange="alert(this);">
everything works correctly.
For some reason, it seems that IE isn't 'seeing' viewDetails.
-
OK I did a bit more checking before posting, and it seems that the js
file isn't loading at all - but only in IE. I can't imagine why.
here's the source:
<script type="text/javascript" src="js/CalendarPopup.js"></script>
<script type="text/javascript" src="js/details.js"></script>
<script type="text/javascript">
ACTIVE_SECTION = 'Late Trains Details';
</script>
The stuff before and after works fine. Only details.js is not loading
- and only in IE.
I'm stumped on this one...