[Sigia-l] OFF-TOPIC plea for HTML help
Joe Sokohl
joe at sokohl.com
Thu Jan 30 18:55:39 EST 2003
Hi all,
Thanks for the comments & interest. Quickly, I asked for help in how to
add tool-tip like help to the options in an HTML dropdown list. I know
you can use the <TITLE> tag on objects such as radio buttons and text
boxes--but can you have help pop up for individual options in a Select
list?
Reason for this: the width of the list is constrained shorter than the
options themselves (which are titles of documents in a library).
Here's what I got:
==================================
You can work around this by removing the pull down altogether and
instead using an overlib tooltip with linked options in the overlib
pop-up.
You'll find details and examples [see last] here
http://www.bosrup.com/web/overlib/features.html
Overlib works with all browser but requires JavaScript enabled. However
it does increase the page size by a good 20-30 kb.
Another option is to use a Show-Hide feature. See
http://www.dingonline.com/qrc_2/facilities/wireframe1120/q1.htm and
click on "Show Definitions..." Note that this too uses JavaScript.
================================
Joe,
you'd have to use Javascript for this I think, I'd say with something
like
<select onChange="javscript:doToolTip(this.value);">
<options....... />
</select>
where the javascript function doToolTip() could take the vale of the
selected item, match it in a list, and then display a message of some
sort
(either via an alert or via a dynamic DIV being displayed somewhere near
the
select box - which would probably be better)
The problem with this approach is that you wouldn't see the message until
after you selected something - which some would say is already too late.
Hope that helps, I'll be interested to see your summary :)
===============================
according to the specs (i.e. recommendations),
the title attribute can be added to almost any element.
if you look at the xhtml DTD, for example, it states:
<!-- core attributes common to most elements
id document-wide unique id
class space separated list of classes
style associated style info
title advisory title/amplification
-->
the DTD goes on to define these as %corrattrs (core attributes?),
which are a constituent element of %attrs (attributes),
which then appear in nearly every element, including the option element.
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
whether or not the browser renders it is another issue, as usual.
have you actually tried it?
it doesnt work in my quick test, on ie 5.2/macosX, nor chimera/macosX.
i suspect it hasnt taken the effort to reconcile the issues around the
nature of a select menu, where the user has to hold the mouse button down
and be in a type of active mode, unlike the typical behavior of other
tooltips,
where the user is assumed to be in a non-active mode w/r/t the specific
form element.
hope this helps, from the standards side anyway.
perhaps you could do it in some nifty but crufty javascript that mimics
the tooltips.
More information about the Sigia-l
mailing list