Connecting Tech Pros Worldwide Help | Site Map

OnClick and OnMouseover on same text?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 07:52 PM
dgmoore@erols.com
Guest
 
Posts: n/a
Default OnClick and OnMouseover on same text?

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, 07:52 PM
kaeli
Guest
 
Posts: n/a
Default 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, 07:52 PM
Lee
Guest
 
Posts: n/a
Default 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, 07:52 PM
RobB
Guest
 
Posts: n/a
Default 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>

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.