[thelist] javascript question

Kevin lists at irubin.com
Wed Jul 17 19:20:00 CDT 2002


Hello,

A little issue. When I attempt to submit a form, the page jumps to the top
and the form submission works. I am trying to find a solution that will keep
the page from moving to the top.

<a href="#" onclick="if (validateform())
{document.mainform.action.value='add_cart';
document.mainform.submit();}"><img src="/images/global/add_to_cart.gif"
border="0"> </a>

If I change the href="#" to href="javascript:;" - the form doesn't submit
...

Any ideas?

--Kevin




More information about the thelist mailing list