Open a hyperlink ‘on mouse over’

Open a hyperlink ‘on mouse over’


Open a hyperlink ‘on mouse over’!

With great power comes great responsibility. If you must have a hyperlink open ‘on mouse over’, add the onmouseover HTML attribute along with the window.open JavaScript method. Code sample and demo after the jump.

 

Code Sample

<a href="/go/link.php?id=14" onmouseover="window.open(this.href, 'child')">This hyperlink opens on mouse over</a>

Live Demo

Click here ‐> This hyperlink opens on mouse over

 



About Giancarlo Colfer
Giancarlo Colfer
Affinity Media & Publishing Group's Founder & CEO

New York Experienced Professional Web Developer & Web Designer with over 18 plus years of experience in HTML, CSS, JavaScript, PHP and more.



Enjoyed this? Share this!

Subscribe to my RSS Feeds, Connect with me or simply recommend me to friends and colleagues!

  • digg
  • stumble
  • delicious
  • reddit
  • tumblr
  • pinterest
  • twitter
  • facebook

JOIN the CONVERSATION
No Responses to “Open a hyperlink ‘on mouse over’”

Be heard! Get involved and post your thoughts on JavaScript today!

Read the comments left by other users below, or:


Guidelines: You share in the Affinity Media & Publishing Group, LLC community, so please keep your comments smart and civil. Do not attack other readers personally, and keep your language decent.

XHTML: You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Signed in as [ Guest — Welcome! ]

AvatarNot sure how to get an image with your comment?

Terms of use: The views, opinions and comments posted are yours, and are not endorsed by this website. You shall be solely responsible for the comment posted here. The website reserves the right to delete, reject, or otherwise remove any views, opinions and comments posted or part thereof. You shall ensure that the comment is not inflammatory, abusive, derogatory, defamatory &/or obscene, or contain pornographic matter and/or does not constitute hate mail, or violate privacy of any person (s) or breach confidentiality or otherwise is illegal, immoral or contrary to public policy. Nor should it contain anything infringing copyright &/or intellectual property rights of any person(s).

Comments
  1. G.Colfer Giancarlo Colfer said 3,857 days ago: Alternatively: 333,244,800 seconds ago. 5,554,080 minutes ago. 92,568 hours ago. Or 551 weeks ago. Be the first to comment, share your thoughts and join the conversation today! May 27, 2003 at 12:01am EST