many onclicks

JavaScript and client side scripting.

Moderator: General Moderators

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

shiznatix wrote:whew productive evening so far. everything is coming together really well just 1 last thing.

when i do:

Code: Select all

<a href="#" onclick=".....">
when you click the link it executes the javascript but it jumps the page to the top so it like scrolls the page back up to the top. I really need it to not jump like that. any ideas?
<a href="javascript:void(0);" onclick=".....">

;)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You could also do something like...

Code: Select all

<a href="javascript: functionName(param1, param2);">Link Text</a>
Post Reply