Mouse Action

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

Mouse Action

Post by szms »

I have couple of web links in my website and like to show more information about the web link when the mouse is over the web link. How to do that?
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

It's done by event attributes. Experiment with:

Code: Select all

<a href="#" onmouseover="alert('you are over me, get off of me!')">get over me</a>
There's plenty of free ones out there. Maybe at hotscripts?

-Nay
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

do you really need the href='#' thing?
i don't know why that's important, to make the link appear as a link an not normal text or what?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You could avoid using javascript for this depending on what exactly you are trying to do, by using the title attribute:

Code: Select all

<a href="http://www.devnetwork.net" title="This is a link to www.devnetwork.net">PHPDN</a>
Mac
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

vigge89 wrote:do you really need the href='#' thing?
i don't know why that's important, to make the link appear as a link an not normal text or what?
# in nay's code is probably just being used as a place holder. You should never have a link on a live site with just # in it, normally that means your site will not work properly with Javascript turned off.

Mac
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

twigletmac wrote:
vigge89 wrote:do you really need the href='#' thing?
i don't know why that's important, to make the link appear as a link an not normal text or what?
# in nay's code is probably just being used as a place holder. You should never have a link on a live site with just # in it, normally that means your site will not work properly with Javascript turned off.

Mac
oops, missed that he needed a LINK, and not just normal text with tip :roll: :?
Post Reply