# Page jumps to the top when using "#" to activate a javascript

**URL:** https://forum.kirupa.com/t/page-jumps-to-the-top-when-using-to-activate-a-javascript/132501
**Category:** Uncategorized
**Created:** [December 29, 2004, 11:01am UTC](https://forum.kirupa.com/t/page-jumps-to-the-top-when-using-to-activate-a-javascript/132501 "2004-12-29T11:01:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tony\_Bolero](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@Tony\_Bolero](https://forum.kirupa.com/u/Tony_Bolero)
#### Post date: [December 29, 2004, 11:01am UTC](https://forum.kirupa.com/t/page-jumps-to-the-top-when-using-to-activate-a-javascript/132501/1 "2004-12-29T11:01:02Z")

</div>

On my page I have a picture that I want to swap to another pic when clicking on a button.

I´m using the a href="#" to activate the javascript but that makes the page jump to the top. I know that I can write something like a href="javascript… but I can´t remember how to write it correctly.

Can someone help me please?

Tony Bolero
