SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    URGENT: OnMouseOver function for Drop Down (<SELECT>)

    Hi:

    i have a drop down, which upon selection (onchange) submits the form. In the script I check that if the SELECTED value has any children (Parent-Child relationship).

    If it does, I get the new AND old values (BOTH parent & child). Then when I reload the page, I draw TWO drop downs.
    First for Parent (with the value PRE-Selected)
    Second for Child (with empty value at top to make users select it)

    The problem I have right now is,
    My boss wants me to put some images on that page which will change with OnMouseOver on the drop down (depending on which drop down we are using)

    Now, I am not sure how to use OnMouseOver on a <select> element and make the image change as I go through different <option>s

    Can somebody please help me?

    I have to do it in 2 days.

    Thanks
    ---------------------------
    Errors = Improved Programming.
    My Site

  2. #2
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I found this here
    http://www.thescripts.com/forum/thread606669.html

    Problem is IE doesn't show tool tip (in THAT example and I can alter it for me later) for EVERY element BUT ONLY for FIRST element.

    How can i change that?

    Thanks
    ---------------------------
    Errors = Improved Programming.
    My Site

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm a bit confused as to what you're trying to achieve here...

    In looking through the code that's posted, the example is using the onclick event for options. This won't work in IE because it's not supported. Use the onchange event for the <select> element instead.

  4. #4
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That example is using
    ONMOUSEOVER
    &
    ONMOUSEOUT


    That is what I am trying to do. Only it doesn't work properly in IE.
    ---------------------------
    Errors = Improved Programming.
    My Site

  5. #5
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont think it ever will work properly in IE.

    You can't raise events like onmouseover/onmouseout from options.
    IE's window.event doesn't seem to want to have the <option> as a target element.

    What is this for? Can't you do the same thing with a <ul> list?

  6. #6
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But, with drop down I can keep the selected Item when the new page loads.

    What will happen is, when an item is selected it will reload the page and create ANOTHER drop down keeping the old value selected in the old drop down.

    Can I do same with <ul>?
    ---------------------------
    Errors = Improved Programming.
    My Site


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •