...

View Full Version : Ignore href of <a> if JS enabled?



]|V|[agnus
06-09-2004, 09:19 PM
I've got an image gallery and what I would like is to have JS enabled users swap a larger image source when clicking the thumbnails, but that if JS is disabled, the href of the thumbnail link would be to the larger image.

<a href="images/big.jpg" onclick="enlarge('big.jpg')"><img ... /></a>

Thanks in advance to any helpful parties...

Vladdy
06-09-2004, 09:26 PM
<a href="..." onclick="return yourFunction()">
where yourFunction returns false to cancel further anchor onclick action

]|V|[agnus
06-09-2004, 09:28 PM
I had a feeling it was something like that, but I am teh JS n00b. Thank you. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum