Tool Tip on a Perl CGI script

Hi,

I am writing a perl script using Perl CGI. There are various HTML tables and forms involved in this. Now I wanted to add a tool tip to the elements here but I am not able to find documentation on how to do it. Can anyone help?

Thanks in advance.

Regards,
garric

I'm not exactly sure if this can be of any help, but let me try :slight_smile:
I found it after someone's claim that there will be such perl module available in CPAN, but I couldn't find such.

Depends how you would like to get the tool tips to appear, and on what kinds of elements. There are mostly two ways I can think of: plain HTML or Javascript/DHTML.

For instance, on many HTML elements you can use the 'title' tag attribute and many browsers will render its value as a tool tip. However, in the past I have used this on image and anchor. Not tried on other elements.

Otherwise, some people may use some Javascript/DHTML that dynamically creates a floating object containing the text at the given mouse location (as captured by the onmouseover event listener). However, this requires the browser with Javascript enabled and the script may be browser-dependent (to some extent). The javascript library listed is an example.

This does not have much to do with Perl, so it is not at all surprising that you are unable to dig anything up in the Perl docs.

The basic technique is to use CSS. Something like the dotted underlines in HTML 4.01 Tutorial : Borders perhaps?

It has nothing to do with the CSS but the tooltip is due to the "title" attribute applied to the HTML, as mentioned. But still, it is up to the browser to decide whether a "title" attribute causes a tooltip to be displayed, although it is normally the case. So it is up to the original poster to think whether the "title" attribute is what is needed.

Thanks for the replies..

I am looking for some dynamic and some static tool tips. For example, if I point to a particular entry in a html table, I want to be able to query some for some information and show it on a tool tip.

@sysgate: Is that javascript module you have suggested copyrighted? Can it be resued?