Forum Moderators: open

Message Too Old, No Replies

javascript doesn't execute on IE on imac

javascript doesn't execute on IE on imac

         

darex

12:04 pm on Dec 17, 2003 (gmt 0)

10+ Year Member



The following code works fine on IE and mozilla (NS7) on w2k machines but it doesn't work on IE on an Imac

<select name="Years" class="dropDownList" size=1>

<option value="YYYY" selected>YYYY

<script type="text/javascript">writeYears()</script>

</select>

The dropdownbox on IE on the imac just displays

YYYY writeYears()


Does anyone know how to solve this?

tedster

8:31 am on Jan 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry your post has gone unanswered for so long -- too much holiday season I guess.

The issue probably sits with the definition of the function writeYears() -- can we see that code?

dcrombie

10:33 am on Jan 14, 2004 (gmt 0)



Try validating your HTML - I don't think you can place a SCRIPT like that in the middle of a SELECT element. The reason it's displaying after the YYYY is that the previous OPTION hasn't been closed.

If you're trying to write out the OPTION text dynamically then you probably need to write the entire line - or even the entire SELECT...