SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Disabling ALT tag in Javascript

    Is there a way to use javascript to disable the alt tag from appearing on a webpage when mousing over it? I mean, I want to be able to insert a caption into the alt tag, but I don't want it to appear when resting your pointer over (specifically in IE). Does anyone know how it can be done?

  2. #2
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    displaying the alt tag in IE is its default behaviour ........ other browsers like FF dont do it, they correctly display the title tag (if any) when moused over....

    Im not aware of ANY way to stop IE from doing that ....


    BTW, are we trying to be "sneaky" with the search engines??? HMMMM, Fess up!

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No actually. I want to caption images in the TITLE tag, so I adapted a NiceTitles script to display them in a styled fashion. The only problem is, the ALT tag in IE comes up along side the title, so it's rather annoying. If you have ANY suggestions, I would be more than thrilled! :-D

    http://www.victr.lm85.com/

  4. #4
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is that link at the bottom of your post the page in question? Cause IM not seeing it in IE .......

    I honestly dont know if there is a way to use alt tags (which are required for validation) but tell IE NOT to show them on hover .... Ive even Googled it but with no decent results.

    And I assume by title tags you are referrring to are title attributes in the hyperlinks NOT the actually title tag in the head of your document.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's right. Let me give you an exact example page: http://victr.lm85.com/moblog/winners...ld-be-shot.php. The ALT tag is required so it will show up in IE along side the title attribute.

    Update: I found an easier thing to do. I've just had the Javascript recognize ALT tags and have them appear in Firefox. Works like a charm.


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
  •