Forum Moderators: open

Message Too Old, No Replies

Submit button that doesn't submit

with the help of JavaScript?

         

joshuakaufman

7:46 pm on Jul 16, 2004 (gmt 0)

10+ Year Member



I would like to add a submit button to a form that doesn't actually submit the form, but instead runs a JavaScript function. Is this possible?

Thanks!

Birdman

8:23 pm on Jul 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello,

You can use the 'button' input type to trigger JS functions with out submitting.

<input type="button" value="click me!" onclick="someFunction()" />

Birdman