Dean OBrien
asked on
Anchor tag - disable HREF - call javascript function
Experts,
I was pretty sure i knew how to do this, yet it doesnt seem to want to work in firefox, please can you look at the code below and see what im doing wrong...
It still links though to the HREF (on firefox).
Regards
Easynow
I was pretty sure i knew how to do this, yet it doesnt seem to want to work in firefox, please can you look at the code below and see what im doing wrong...
It still links though to the HREF (on firefox).
Regards
Easynow
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<script>
function fireAlert()
{
alert();
}
</script>
</HEAD>
<BODY>
<a href="yourlink.com" onclick="fireAlert();return false">test1</a>
<a href="mylink.com" onclick="fireAlert();return false">test1</a>
<a href="theirlink.com" onclick="fireAlert();return false">test1</a>
</BODY>
</HTML>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cheers for comments
Open in new window