Results 1 to 8 of 8

Thread: How do a select with tooltip in IE?

  1. #1
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do a select with tooltip in IE?

    How do a select with tooltip in IE?

    The attribute title in an option only works in Mozilla/Firefox.

    Thanks.

  2. #2
    Join Date
    Dec 2005
    Location
    Moscow, Russia
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The tooltip cannot appear in IE because in him for displaying of tag SELECT objects which have been built-in in Windows are used. It is necessary to use other means, for example, calling tip on onmouseover. For example:
    Code:
    -----<span>
    	<select style=position:absolute;
    		onmouseover=document.all.s1.style.visibility='visible';
    		onmouseout=document.all.s1.style.visibility='hidden';
    		><option>fdsf</option></select>
    	<span id=s1 style=position:relative;top:-20;left:50;visibility:hidden;background:yellow;padding:4;>prompting</span>
    </span>+++++++

  3. #3
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks.

    It's possible the same effect in every select's option? I think onmouseover is disabled in tag option.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    1) Keep your indentation style constant.
    2) Never use document.all except as an IE test.
    3) All attribute values must be surrounded with quotes, except when said value is a number; it's recommended even then.
    Code:
    -----<span>
            <select
                    style="position:absolute;"
                    onmouseover="document.getElementById('s1').style.visibility='visible';"
                    onmouseout="document.getElementById('s1').style.visibility='hidden';"
            >
                    <option>
                            fdsf
                    </option>
            </select>
            <span
                    id="s1"
                    style="
                            position: relative;
                            top: -20;
                            left: 50;
                            visibility: hidden;
                            background: yellow;
                            padding: 4;
                    "
            >
                    prompting
            </span>
    </span>+++++++
    javinski: Yes, it should be possible to use this code for every select. However, remember to use a different ID.
    onmouseover cannot be disabled, in "tag option" or no.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry, my english isn't too good.
    I want that every option of mySelect have onmouseover(or similar) but this event doesn't works in IE.

    <select name="mySelect">
    <option onmouseover="alert('hello1')">1111</option>
    <option onmouseover="alert('hello2')">2222</option>
    <option onmouseover="alert('hello3')">3333</option>
    </select>

    Thanks

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Sorry, my english isn't too good.
    No problem, but can you try to explain again what you mean by "tag option?"
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    <select name="mySelect">
    <option onmouseover="alert('hello1')">1111</option> --> First Tag Option
    <option onmouseover="alert('hello2')">2222</option> --> Second Tag Option
    <option onmouseover="alert('hello3')">3333</option> --> Third Tag Option
    </select>

    In IE don't exists the event onmouseover in the option, and i need a similar event that do the same.

    Thanks for all.

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Ah, I see what you mean. This could be tricky.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •