Until fairly recently, popups had to be new browser windows opened by Javascript. However, with the introduction of the 'TITLE' annotation tooltip (which can also be inserted into hyperlinks to explain the link in more detail), the familiar (to Windows users) yellow popup box can be added to any word in the text of a webpage. This has many uses:
This is supported by all the latest browsers, and we can confidently expect it to be universal very soon.
Each word could be colored by a font color tag. However, it is much easier to use a Style sheet to control an entire class of such words.
The descriptive TITLE text description can be quite long if needed.
A style sheet in the page header, or incorporated into a site-wide style, could look something like this:
.popup
with the text on the page appearing like this:
{
COLOR: #9F141A;
CURSOR: help;
TEXT-DECORATION: none
}
</STYLE>
<SPAN title=" description here " class="popup">text</SPAN>
By leavng a space before and after the description, additional left/right padding is created making the text easier to read. The value for CURSOR can be the following: default, auto, crosshair, hand, move, n-resize, s-resize, e-resize, w-resize, ne-resize, se-resize, nw-resize, sw-resize, text, wait, help. The HELP value creates a mouseover ? mark, and seems the most suitable for any situation where you are wishing to provide an answer or further information.
The value for color can be any possible color using hexadecimal or whatever. Text-decoration can be none or underline if you wish it to appear like a normal link.
You can also add the line FONT-STYLE with these values: normal, italic, oblique. Additional other style elements can be introduced if needed.
See it working
Here are some examples:
You can also add a title annotation to the text area of a form, and/or to the form button, to amplify any instructions you wish to provide to users.
Additional information at CSS sites such as: W3 | Hypergurl | Jigsaw.
You can achieve more sophisticated results with colored text, background and even graphics in the annotation box, using DHTML tooltips - but it requires a lot of extra code on the page:
If you include the coding for the text, color, even graphics, within the script, they are much quicker to operate because they don't actually have to open a new page. Here is one example, offering a word definition.
"I was surprised to see an adder in my garden today."
If you view the source code for this page (including the style sheet and javascript in the page head, you will see how this popup has been created. Copy the coding and make modifications according to your own requirements. The link in this case goes to a footnote or new page, for those for whom Javascript is not working or who have blocked popops (see below. You can control many features of the popup - size, background, font, even include a graphic.
For more detailed information on creating Javascript popups, check:
Unfortunately, it seems that some browsers or popu; killers, when set to remove popup ads also block ANY window which is opened by Javascript. This is a shame because javascript-opened popup windows have many legitimate uses. For example, online booking sites so you can get extra information in a small popup when you need it. It can be useful to open a Bible reference in a javascript-opened window of defined size. You can overcome this problem in many cases by creating a hybrid link like this:
<a href="page.html" target="_blank" onclick="window.open(this.href, this.target,'toolbar=no,scrollbars=yes,location=no,status=yes'); return false;" title=" Description of link ">Click here</a>
If you have further comments on this problem, the subject of making TITLE= annotations, or any other suggestions for using them, please write.
| ? Explore & discuss |
|
© Sep 2008 Web Evangelism Guide Contact us Sitemap Privacy About us Meaning of life
|
|
|