Connecting Tech Pros Worldwide Forums | Help | Site Map

OnClick and OnMouseover on same text?

dgmoore@erols.com
Guest
 
Posts: n/a
#1: Jul 23 '05
Is it possible to put an OnMouseover event on a regular Hlink so that
hovering displays a JavaScript alert and clicking follows the link?

Thanks
Dave


kaeli
Guest
 
Posts: n/a
#2: Jul 23 '05

re: OnClick and OnMouseover on same text?


In article <1116348453.237405.251640@g47g2000cwa.googlegroups .com>,
dgmoore@erols.com enlightened us with...[color=blue]
> Is it possible to put an OnMouseover event on a regular Hlink so that
> hovering displays a JavaScript alert and clicking follows the link?
>[/color]

Using an actual alert?
In theory, possibly, but not in practice.
When the user clears the alert, they won't be hovered anymore (to click). But
they have to click OK to clear the alert. So the only thing that will end up
triggered is the hover.

Use the title attribute of the link to display info when the mouse is
hovered.

--
--
~kaeli~
Can you be a closet claustrophobic?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Lee
Guest
 
Posts: n/a
#3: Jul 23 '05

re: OnClick and OnMouseover on same text?


dgmoore@erols.com said:[color=blue]
>
>Is it possible to put an OnMouseover event on a regular Hlink so that
>hovering displays a JavaScript alert and clicking follows the link?[/color]

It would be hard to click on the link, because every time you move
the mouse over it, focus moves away to the alert. Why an alert?

RobB
Guest
 
Posts: n/a
#4: Jul 23 '05

re: OnClick and OnMouseover on same text?


dgmo...@erols.com wrote:[color=blue]
> Is it possible to put an OnMouseover event on a regular Hlink so that
> hovering displays a JavaScript alert and clicking follows the link?
>
> Thanks
> Dave[/color]

This could be very annoying...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body>
<a
href="http://www.google.com"
onmouseover="alert('...go to google');top.location=this.href">link
w/alert</a>
<hr>
<a
href="http://www.google.com"
onmouseover="if(confirm('...go to
google?'))top.location=this.href">link w/confirm</a>
</body>
</html>

Closed Thread