Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

onMouseOver knick-knack for node links

by japhy (Canon)
on Apr 29, 2001 at 21:45 UTC ( #76491=monkdiscuss: print w/replies, xml ) Need Help??

  • JavaScript haters, please go to another node.
  • Lynx-like folk, please go to another node.
  • HTML purists, please go to another node.
  • DHTML haters, please go to another node.
Thank you. If you want to, just disable JavaScript if this becomes a feature. Or better yet, it'll be a feature you can turn on and off from your home node.

The product I work on at my company is called RiskGrades™, and we have a lot of terms and statistics that require definition or explanation for most folk. So to help them, we have little mouse-over help texts pop up when you move your mouse over the highlighted word. We're making this a feature you can turn off, so that learned folk needn't be bothered.

Well, this morning, converter sent me a message about one of my nodes. There was no context, though, that let me know what the node was about. So I had to click on the link to see. Call me lazy or impatient, but I'd like it if links had "alt" attributes in the same way that images do. That would allow me to just hover over the link and find out the name of the node (assuming the node was created with a node_id, instead of a node name).

Alas, this does not exist (to my knowledge), and thus, I'd like mouse-overs. I have the relevant JavaScript code, and it would only require a bit of work to make it appear more nicely on the screen (to ensure it doesn't run off the side of the page).

japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
Re: onMouseOver knick-knack for node links
by damian1301 (Curate) on Apr 29, 2001 at 22:11 UTC
    Yes, it does exist. In the <a> tag, there is an attribute called title which displays it like the alt attribute on an image. Try running your mouse over


    and on most browsers this will work. Plus, there is no Javascript or any special stuff involved.

    I agree, though, that links should have a little caption on it like the title that used to show up in the [id://XXXXX] thing.

    Sort of like what happens in those Ulitimate Bulletin Board scripts, no?

    UPDATE: I just noticed that vroom doesn't allow this to be used on-site so there is no example :(

    Tiptoeing up to a Perl hacker.
    Dave AKA damian

Re: onMouseOver knick-knack for node links
by Masem (Monsignor) on Apr 30, 2001 at 06:50 UTC

    Not to be nitpicky, but as a so-called HTML purist, not all Javascript is evil, and japhys ideas are very good ones that works for Javascript.

    Basically, any time when Javascript is used as a means to force the user's browser to do something, whether it be the magical "no submit" drop down menus, JS-only image maps or navigation trees, disabling the back button, or resizing the window, this is a rather poor use of it and typically reflects about (IMO) 50% of the JS usage out there. OTOH, using it for roll-overs which only enhance the experience rather than are required, are usually considered a good use of JS by HTML purists.

    Pretty much, the ground rule is accessiblity; if the HTML + JS makes the page unusable in Lynx, the JS is poorly used. But this idea will not incur that problem.

    Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain
      While I generally agree with your assessment of the usefulness of Javascript, it seems to me the real problem is that you either have it on or off, and when it's on to take advantage of some actually useful feature (or in my case because the site I need won't work without it), it also leaves you wide open to all sorts of abuse. As long as I'm forced to use it, it would be nice if the browser would allow me to specify which sites I'm comfortable using Javascript with, and kept it off otherwise, or at least light up a red warnining icon whenever Javascript was on. Until I have that, I'll prefer the simpler solutions, and full points to damian1301 for pointing out that one!

      I'd like to be able to assign to an luser

      There is a site here that you may want to check out. They have a lot to say about web page design, and the misuse of mouseover.

      I realize that this isn't exactly about Perl, but it does seem to follow the topic.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://76491]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2019-10-16 21:49 GMT
Find Nodes?
    Voting Booth?