onclick event does not work with select option in IE

Discussion in 'Javascript' started by prash.marne@gmail.com, Jan 18, 2007.

  1. Guest

    Hello,

    I have a simple form

    <form method="POST">
    <select name="activity">
    <option value="0">None</option>
    <option value="M" onclick="popup_onclick()">Select
    Multiple</option>
    <option value="1">Kayaking</option>
    <option value="2">Rafting</option>
    <option value="3">Snowboarding & Skiing</option>
    <option value="4">Hiking</option>
    <option value="5">Trekking</option>
    </select>
    </form>

    & my javascript code is

    function popup_onclick(){
    my_window = window.open
    ("",'windowname','height=200,width=200');
    my_window.document.write("hellow
    world");
    my_window.document.close();
    }

    When a user chooses the form it shows a dropdown menu & when he clicks
    on 'select multiple' option
    a new window should pop up with words written 'hellow world' in it .
    This works fine in Firefox 1.5 but it doesn't work in IE 6.

    I don't no wat is the problem.
    Anyone have any tips ? Can this be done ? Thanks !
     
    , Jan 18, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J. Hall
    Replies:
    2
    Views:
    1,071
    Jeff Thies
    Apr 21, 2004
  2. Christopher Benson-Manica

    select option element onclick?

    Christopher Benson-Manica, Apr 20, 2004, in forum: Javascript
    Replies:
    1
    Views:
    133
    Matt Kruse
    Apr 20, 2004
  3. Replies:
    2
    Views:
    136
  4. Replies:
    7
    Views:
    221
  5. Moses
    Replies:
    3
    Views:
    191
Loading...

Share This Page