Any way to specify alt text timeout in seconds?

Discussion in 'HTML' started by Chris Ianson, Apr 3, 2006.

  1. Chris Ianson

    Chris Ianson Guest

    Hi all,

    Well having found this group to be a fountain of knowledge I have another
    question. And hey, no worries if you don't know or don't want to answer,
    please ignore this.

    Is there a way to change the timeout of a tooltip AKA alt text over a
    picture? Normally the text appears for about 5 seconds then vanishes, but
    I'd like it to stay indefinitely on a specific picture. (It's a photo with
    a description of the photo).

    Any ideas? Thanks in advance :)
    Chris Ianson, Apr 3, 2006
    #1
    1. Advertising

  2. Chris Ianson

    Dylan Parry Guest

    Pondering the eternal question of "Hobnobs or Rich Tea?", Chris Ianson
    finally proclaimed:

    > Is there a way to change the timeout of a tooltip AKA alt text over a
    > picture?


    It's only Internet Explorer that does this with alt text. Other browsers
    don't exhibit this behaviour for alt attributes, but may show tooltips
    for title attributes.

    > Normally the text appears for about 5 seconds then vanishes, but
    > I'd like it to stay indefinitely on a specific picture. (It's a photo with
    > a description of the photo).


    You can't do this for the actual alt/title text, but you might be able
    to use Javascript to give the same effect.

    http://www.kryogenix.org/code/browser/nicetitle/

    has something that does this sort of thing. To be entirely honest
    though, if it is a description of the image then it shouldn't be in the
    alt attribute anyway - the alt attribute is a *replacement* for the
    image in the event that the image cannot be seen, not a description.

    The title attribute (which is what the above script uses) is probably
    better suited to this, but if the text you plan on using is fundamental
    content then you should really write it on the page rather than hide it
    away as an attribute.

    --
    Dylan Parry
    http://electricfreedom.org -- Where the Music Progressively Rocks!

    Listening to: Sigur Rós - Flugufrelsarinn
    Dylan Parry, Apr 3, 2006
    #2
    1. Advertising

  3. Chris Ianson wrote:

    > Hi all,
    >
    > Well having found this group to be a fountain of knowledge I have another
    > question. And hey, no worries if you don't know or don't want to answer,
    > please ignore this.
    >
    > Is there a way to change the timeout of a tooltip AKA alt text over a
    > picture? Normally the text appears for about 5 seconds then vanishes, but
    > I'd like it to stay indefinitely on a specific picture. (It's a photo
    > with a description of the photo).


    No, there's no way to do this. And the ALT attribute is not supposed to be
    used for the tooltip anyway - it's the text that should be displayed, if
    the image cannot be display for whatever reason. Use the TITLE attribute
    for additional information about the image. And no, you can't control how
    the browser displays the TITLE attribute either.

    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://pink.odahoda.de/
    Benjamin Niemann, Apr 3, 2006
    #3
  4. Chris Ianson

    Spartanicus Guest

    "Chris Ianson" <> wrote:

    >Well having found this group to be a fountain of knowledge


    What group? You cross posted.

    >Is there a way to change the timeout of a tooltip AKA alt text over a
    >picture?


    How to specify alternate text: (and what it is for)
    http://www.w3.org/TR/html4/struct/objects.html#alternate-text

    It's not supposed to be presented as a "tooltip" (common graphical
    browsers), only IE exhibits this behaviour. Advisory title content
    should be coded with the HTML title attribute, use that and even IE will
    display it as a "tooltip".

    >Normally the text appears for about 5 seconds then vanishes, but
    >I'd like it to stay indefinitely on a specific picture. (It's a photo with
    >a description of the photo).


    It's a browser property, a user may be able to change it in their
    browser, an author has no control over it.

    JS can probably be used to generate "tooltip like" widgets, using that
    you probably have some control over the time it's displayed.

    --
    Spartanicus
    Spartanicus, Apr 3, 2006
    #4
  5. Chris Ianson

    Chris Ianson Guest

    "Dylan Parry" <> wrote in message
    news:...

    > You can't do this for the actual alt/title text, but you might be able
    > to use Javascript to give the same effect.
    >
    > http://www.kryogenix.org/code/browser/nicetitle/


    Thanks, I had a look and whilst that works great for the title attrib of
    hyperlinks, it doesn't seem to be able to affect images :(

    Also, I need to remove the destination URL from the popup title.

    > has something that does this sort of thing. To be entirely honest
    > though, if it is a description of the image then it shouldn't be in the
    > alt attribute anyway - the alt attribute is a *replacement* for the
    > image in the event that the image cannot be seen, not a description.


    I agree. I have changed the attrib to 'title' for my images, which still
    gives the tooltip in IE, however I'd like to get nicetitle working for it.
    Any ideas?

    > The title attribute (which is what the above script uses) is probably
    > better suited to this, but if the text you plan on using is fundamental
    > content then you should really write it on the page rather than hide it
    > away as an attribute.


    Due to a lack of room and a penchant for neatness, I am having it so people
    hover over an image for info on it. It works nice in IE at least, other
    than it disappears after 5 seconds :(

    Any ideas?

    Thanks :)
    Chris Ianson, Apr 5, 2006
    #5
  6. Chris Ianson

    dorayme Guest

    In article <AiDYf.48082$>,
    "Chris Ianson" <> wrote:

    > Due to a lack of room and a penchant for neatness, I am having it so people
    > hover over an image for info on it. It works nice in IE at least, other
    > than it disappears after 5 seconds :(
    >
    > Any ideas?


    I would take Dylan Parry's advice about including important
    descriptions in the text of "the" or "a" page. You could work
    with the title tooltip (I agree, annoyingly timing-out) by
    keeping the tooltip very short and easy to read, perhaps even
    with a pointer to more elsewhere... like "see more at right
    panel" or something...)

    What is the purpose of this time out? Surely the timeout should
    be very quick when the mouse leaves the area, not when it might
    be deliberately hovering over the area concerned?

    --
    dorayme
    dorayme, Apr 5, 2006
    #6
  7. Chris Ianson

    Chris Ianson Guest

    "dorayme" <> wrote in message
    news:...

    > I would take Dylan Parry's advice about including important
    > descriptions in the text of "the" or "a" page. You could work
    > with the title tooltip (I agree, annoyingly timing-out) by
    > keeping the tooltip very short and easy to read, perhaps even
    > with a pointer to more elsewhere... like "see more at right
    > panel" or something...)


    Thanks, that is an answer, although a JS solution would be nicer.
    'nicetitle' works great for hyperlink screentips.

    Is it true that alt= only acts as a tooltip in IE, whereas title= works as a
    tooltip in all browsers? If so, is the timeout the same as with IE?

    > What is the purpose of this time out? Surely the timeout should
    > be very quick when the mouse leaves the area, not when it might
    > be deliberately hovering over the area concerned?


    I agree! Perhaps Bill thinks we have short attention spans. Now what was
    my name again?...
    Chris Ianson, Apr 5, 2006
    #7
  8. Chris Ianson

    dorayme Guest

    In article <zMDYf.48098$>,
    "Chris Ianson" <> wrote:

    > "dorayme" <> wrote in message
    > news:...
    >
    > > I would take Dylan Parry's advice about including important
    > > descriptions in the text of "the" or "a" page. You could work
    > > with the title tooltip (I agree, annoyingly timing-out) by
    > > keeping the tooltip very short and easy to read, perhaps even
    > > with a pointer to more elsewhere... like "see more at right
    > > panel" or something...)

    >
    > Thanks, that is an answer, although a JS solution would be nicer.
    > 'nicetitle' works great for hyperlink screentips.


    Yes, perhaps for those who have js on. There are a chunk of folk
    who do not, this might vary between classes... The big point is
    this, if it quite important info, best not to rely on js.

    >
    > Is it true that alt= only acts as a tooltip in IE, whereas title= works as a
    > tooltip in all browsers? If so, is the timeout the same as with IE?
    >


    alt does not trip any tooltip text on my MacIE but title, of
    course, does. Nor on other browsers that I have noticed. Safari
    does have a longer time, 10 sec!

    > > What is the purpose of this time out? Surely the timeout should
    > > be very quick when the mouse leaves the area, not when it might
    > > be deliberately hovering over the area concerned?

    >
    > I agree! Perhaps Bill thinks we have short attention spans. Now what was
    > my name again?...


    I had supposed there might be this reason, but really, I am no
    js/browser interaction expert: if it did not disappear quickly
    there would be left a trail of tooltips around. But this is not
    so, Safari hangs on only when the mouse is appropriately
    positioned. Anyone know the reason for a timeout, given that if a
    user moves away, it stops anyway? Soon as I post this, I will
    think of something. Or not!

    --
    dorayme
    dorayme, Apr 5, 2006
    #8
  9. dorayme wrote:
    <snip>
    > I had supposed there might be this reason, but really, I am no
    > js/browser interaction expert: if it did not disappear quickly
    > there would be left a trail of tooltips around. But this is not
    > so, Safari hangs on only when the mouse is appropriately
    > positioned. Anyone know the reason for a timeout, given that if a
    > user moves away, it stops anyway? Soon as I post this, I will
    > think of something. Or not!
    >

    I believe the browser tooltip balloon it browser is browser dependent on
    A) whether on not it is displayed and B) for how long...it is not
    scriptable. If you have information that it really important then it
    should be in your content and do not rely on the tooltip. The title
    attribute should be for auxiliary information only.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Apr 5, 2006
    #9
  10. Chris Ianson

    Neredbojias Guest

    To further the education of mankind, "Chris Ianson" <>
    declaimed:

    > "dorayme" <> wrote in message
    > news:...
    >
    >> I would take Dylan Parry's advice about including important
    >> descriptions in the text of "the" or "a" page. You could work
    >> with the title tooltip (I agree, annoyingly timing-out) by
    >> keeping the tooltip very short and easy to read, perhaps even
    >> with a pointer to more elsewhere... like "see more at right
    >> panel" or something...)

    >
    > Thanks, that is an answer, although a JS solution would be nicer.
    > 'nicetitle' works great for hyperlink screentips.


    What you probably want could be done with css hover by including an
    invisible, positioned box in each link, then showing it on hover. Google
    for "css hover" methods.

    --
    Neredbojias
    Infinity can have limits.
    Neredbojias, Apr 5, 2006
    #10
  11. JRS: In article <>, dated Wed, 5 Apr
    2006 03:17:38 remote, seen in news:comp.lang.javascript, Thomas
    'PointedEars' Lahn <> posted :
    >
    >All of this is very off topic in comp.lang.javascript. Please stop
    >crossposting, especially from alt.* into Usenet (here: comp.*).
    >
    ><URL:http://en.wikipedia.org/wiki/Usenet>
    >


    There is nothing wrong with crossposting, between alt and Big-8 or
    otherwise, if it is considered that the material is sufficiently
    appropriate for both groups.

    Wikipedia is not a Usenet authority; Usenet has its own mechanisms.
    Also, trustworthy authors have Web pages on the topic - see, for
    example, signature line 2.

    In particular, always check the authorship of Wikipedia articles, lest
    they have been edited by well-known incompetents or kooks. In
    particular, of course, Thomas Lahn himself.

    It is, of course, bad manners to set a follow-up to a group which has
    not received earlier articles in the thread.

    --
    © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME ©
    Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
    Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
    No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
    Dr John Stockton, Apr 6, 2006
    #11
    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. tshad
    Replies:
    7
    Views:
    16,900
    tshad
    Mar 11, 2005
  2. 00_CP_D12
    Replies:
    3
    Views:
    8,872
    dilipv
    Feb 22, 2008
  3. Stu
    Replies:
    7
    Views:
    1,725
    Dave Thompson
    Mar 7, 2005
  4. Michael Tan
    Replies:
    32
    Views:
    925
    Ara.T.Howard
    Jul 21, 2005
  5. Chris Ianson

    Any way to specify alt text timeout in seconds?

    Chris Ianson, Apr 3, 2006, in forum: Javascript
    Replies:
    9
    Views:
    119
    Chris Ianson
    Apr 6, 2006
Loading...

Share This Page