Inch
03-13-2002, 09:49 AM
Is it possible when using an onClick event to prevent the page from jumping back to the top onClick?
I have a page which has 12 thumbnail images (6 at the top, 6 at the bottom), and when you click on a thumbnail, a corresponding larger image is shown in the middle of the page. I have used a:
<a href="#" onClick="bigimg();")>
tag to call the function which carries out the onClick. However, this causes the page to leap back to the top every time a thumbnail is clicked.
I have also tried:
<a href="javascript:void(0);" onClick="bigimg();">
but this just causes the big image not to load occasionally. Are there any other ways of doing this.
Thanks in advance. :)
I have a page which has 12 thumbnail images (6 at the top, 6 at the bottom), and when you click on a thumbnail, a corresponding larger image is shown in the middle of the page. I have used a:
<a href="#" onClick="bigimg();")>
tag to call the function which carries out the onClick. However, this causes the page to leap back to the top every time a thumbnail is clicked.
I have also tried:
<a href="javascript:void(0);" onClick="bigimg();">
but this just causes the big image not to load occasionally. Are there any other ways of doing this.
Thanks in advance. :)