Connecting Tech Pros Worldwide Help | Site Map

OnClick and OnMouseover on same text?

  #1  
Old July 23rd, 2005, 08:52 PM
dgmoore@erols.com
Guest
 
Posts: n/a
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

  #2  
Old July 23rd, 2005, 08:52 PM
kaeli
Guest
 
Posts: n/a

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

  #3  
Old July 23rd, 2005, 08:52 PM
Lee
Guest
 
Posts: n/a

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?

  #4  
Old July 23rd, 2005, 08:52 PM
RobB
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help - change text on click - text has another onclick inside with php variables wizdom answers 18 January 27th, 2009 08:22 AM
Show and hide on the same click timplx answers 3 January 1st, 2009 02:07 PM
How to make control visible/invisible on mouseover. Selden McCabe answers 6 November 19th, 2005 10:19 AM
Overriding '<a href' with '<a onClick' for JavaScript function openWindow(URL) for image and link... Kevin Lyons answers 2 July 23rd, 2005 01:28 PM