Click here to get back home

popup text when the pointer is on some text

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
popup text when the pointer is on some text Orloff 07-30-2005
Get Chitika Premium
Posted by Orloff on July 30, 2005, 10:33 am
Please log in for more thread options


Hi,
on most (all?) browsers, when you put the pointer on a
<a href="..." title="popup text">this is a link</a>
without clicking on the link, there is a popup caption with the "popup
text".

I would like to achieve the same with some text that is not a link.
I realized that I could simply make it
<a title="popup text">this is just some text</a>

My question: is it the best way to achieve what I want?
Are there alternative ways?
Is it portable?

Thank you!

Posted by Arne on July 30, 2005, 10:52 am
Please log in for more thread options


Once upon a time *Orloff* wrote:
> Hi,
> on most (all?) browsers, when you put the pointer on a
> <a href="..." title="popup text">this is a link</a>
> without clicking on the link, there is a popup caption with the "popup
> text".
>
> I would like to achieve the same with some text that is not a link.
> I realized that I could simply make it
> <a title="popup text">this is just some text</a>
>
> My question: is it the best way to achieve what I want?
> Are there alternative ways?
> Is it portable?
>
> Thank you!

Yes, it's the best way. However, if you like to add longer text that
wraps into several lines within the tooltip box, you need to use
Javascript (DHTML) like the examples shows here:

http://www.walterzorn.com/tooltip/tooltip_e.htm

Of course, it will not work if the browser don't support Javascript
(have Javascript disabled)

--
/Arne
My "widget" site: http://hem.bredband.net/arnel/
Top posters will be ignored. Quote the part you
are replying to, and don't quote signatures!

Posted by Orloff on July 30, 2005, 6:25 am
Please log in for more thread options


Arne wrote:

> Once upon a time *Orloff* wrote:
>> Hi,
>> on most (all?) browsers, when you put the pointer on a
>> <a href="..." title="popup text">this is a link</a>
>> without clicking on the link, there is a popup caption with the "popup
>> text".
>>
>> I would like to achieve the same with some text that is not a link.
>> I realized that I could simply make it
>> <a title="popup text">this is just some text</a>
>>
>> My question: is it the best way to achieve what I want?
>> Are there alternative ways?
>> Is it portable?
>>
>> Thank you!
>
> Yes, it's the best way. However, if you like to add longer text that
> wraps into several lines within the tooltip box, you need to use
> Javascript (DHTML) like the examples shows here:
>
> http://www.walterzorn.com/tooltip/tooltip_e.htm
>
> Of course, it will not work if the browser don't support Javascript
> (have Javascript disabled)
>

Thanks Arne.

Posted by David Dorward on July 30, 2005, 12:45 pm
Please log in for more thread options


Orloff wrote:

> <a title="popup text">this is just some text</a>

> My question: is it the best way to achieve what I want?

No. Anchors should be links or link targets.

> Are there alternative ways?

Use a more suitable element. What that is depends on what the text is (e.g.
expansion of an abbreviation, a definition, etc), and could be abbr, dfn,
span, or something else.

> Is it portable?

To some degree. Advisory text (which is what the title attribute holds)
shouldn't be essential reading though.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is

Posted by Andy Dingley on July 30, 2005, 3:41 pm
Please log in for more thread options



><a title="popup text">this is just some text</a>
>
>My question: is it the best way to achieve what I want?
>Are there alternative ways?

Just use the title attribute and put it on any element you wish - you
don't need to add spurious <a> elements.

It'll generally work, for most elements, most of the time.

Similar ThreadsPosted
How to align text label and input field's text ? June 11, 2007, 6:10 am
Text and Image inside table Alight Text Left and Image right in same cell ?? October 24, 2006, 12:55 am
Re: Text wrapped around a picture -- picture longer than text April 27, 2008, 10:40 am
Re: Text wrapped around a picture -- picture longer than text April 27, 2008, 7:29 pm
ALT for text? February 9, 2006, 3:26 pm
how to specify often-used text just once? March 16, 2007, 7:12 am
Boxed text July 12, 2004, 4:21 pm
Hidden text October 19, 2004, 5:12 pm
Mousing Over Text December 17, 2004, 3:56 am
ALT image for text? February 28, 2005, 10:40 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap