Re: Display text when mouse over an object



Tom Cole wrote:
On Feb 27, 11:37 pm, dmkAlex <dmkf...@xxxxxxxxx> wrote:
I have a column containing the title of my merchandises. The title
doesn't describe the merchandise fully, but I don't want to display all
the detail description.

I want a small bulletin open up when the mouse is over the title. This
way, the user can move the mouse over the title and read a brief
description of the item.

How is that done?

Use the Source, Luke.

[...]

You could setup a hidden div and position / display onmouseover

Of the mentioned alternatives that would be best, although plain CSS also
can take care of that. IIRC I have posted an example before.

or use an existing javascript library (i.e. walterzorn.com has a very handy
tooltip script that's simple to use)

I have reviewed Walter Zorn's Tooltip Library recently. The least I can say
about it is that it uses deprecated, because unreliable and unnecessary,
coding practices, and false assumptions, such as eval() calls and browser
sniffing for property inference.

Here is a good example of what I mean, from tt_Browser() in wz_tooltip.js,
called from tt_Init() in the same file which is *required* for the operation
of this script:

[pretty-printed]
| tt_op = (document.defaultView && typeof(eval("w" + "indow" + "." + "o"
| + "p" + "er" + "a")) != tt_u);
| tt_ie = n.indexOf("msie") != -1 && document.all && !tt_op;
| if(tt_ie)
| {
| var ieOld = (!document.compatMode
| || document.compatMode == "BackCompat");
| tt_db = !ieOld ? document.documentElement : (document.body || null);
| if(tt_db)
| tt_ie56 = parseFloat(nv.substring(nv.indexOf("MSIE") + 5)) >= 5.5
| && typeof document.body.style.maxHeight == tt_u;
| }
| else
| {
| tt_db = document.documentElement || document.body
| || (document.getElementsByTagName
| ? document.getElementsByTagName("body")[0]
| : null);
| if (!tt_op)
| {
| n6 = document.defaultView
| && typeof document.defaultView.getComputedStyle != tt_u;
| w3c = !n6 && document.getElementById;
| }
| }

Avoid it at all costs in its current form.

however a simpler solution may be just to set the title attribute of the
containing element (you mentioned column so I'm guess the title is inside
a td element, so you can set it's title attribute). This will cause a
tooltip to appear with the title text in it.

In several cases (particularly graphical Web browsers for PC or Mac) a
`title' attribute may lead to the display of a tooltip; however, there is no
requirement per the specification. And in many cases the tooltip text will
be trimmed to an unspecified number of characters. Bad advice as well.


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
.



Relevant Pages

  • Re: how to add tooltips to excel udfs i created?
    ... Can display a tooltip (a window with some text, ... userform if coding in VBA) to appear next to a cell while mouse hovers over ... Identify when user enters edit mode ...
    (microsoft.public.excel.programming)
  • Re: Visio 2007 visEquivTitle
    ... then the display is probably just turned off. ... Microsoft Certified Technology Specialist - Visio 2007 Applicaiton Development ... There is a function called 'tooltip' that works with a standard drawing. ... You can add the User.visEquivTitle cell to your shape and provide a string ...
    (microsoft.public.visio.general)
  • Re: Displaying Data on MouseOver
    ... You can add the User.visEquivTitle cell to your shape and provide a string ... at least one custom property for the tooltip to be visible. ... In the Value cell of that row, enter the text you want to display ... You can fill in the custom property Label and Value if you want this ...
    (microsoft.public.visio.general)
  • RE: Change tool Tip for Macros
    ... have a custom toolbar that is used to invoke various macros via buttons on ... and your question is related to the tooltip that is displayed ... when you place the cursor over one of these toolbar buttons. ... you could have the 'Help' button display ...
    (microsoft.public.word.vba.general)
  • Re: Increasing Tooltip visibilty
    ... change a setting somewhere to increase the tooltip visible time? ... entirely up to the browser how that is displayed. ... Most browsers will display a tooltip, but you can't set any properties for this ...
    (microsoft.public.dotnet.framework.aspnet)

Loading