• Resolved pdflyboy

    (@pdflyboy)


    I used js to make items on a dropdown clickable. Works in Chrome and Firefox but not IE9 (confirmed script options enabled). Could someone check out my code? I’ve run validators but doesn’t seem to be getting at specific problem. For example, please see tedseastrom.com/blog–dropdown in the left pane. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pdflyboy

    (@pdflyboy)

    Here’s the code:

    <script language="javascript" type="text/javascript">
    function go_there(where){
    window.location.href = where;
    }
    </script>
    
    <select size="5" style="width:150px">
    
    <option onclick="go_there('https://127.0.0.1:4001/wordpress/hours/');">10,000 Hours</option>
    Thread Starter pdflyboy

    (@pdflyboy)

    Figured it out: IE doesn’t support onclick event with select object. Rewrote code as follows, works in all browsers:

    <select size="5" style="width:150px" onchange="window.open(this.options[this.selectedIndex].value,'_top')">
    <option value="https://127.0.0.1:4001/wordpress/hours/">10,000 Hours</option>
    
    <option value="https://127.0.0.1:4001/wordpress/52/">Area 52</option>
    [etc]
    </select>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JS function works in Chrome/Firefox but not IE9’ is closed to new replies.