How can i set the action of a form to void, null or empty? Actually I want my form to perform a js action and not refresh the page so if i write <form action=""> it will refresh the page...how can i avoid this refreshing of pagE?
Fotiman
6:00 pm on Jul 30, 2007 (gmt 0)
Easy... instead of using a submit button (<input type="submit">), use a regular old "button" (<input type="button">. Keep in mind, though, that your page will be broken for any visitors that have JavaScript disabled.
kaled
10:54 pm on Jul 30, 2007 (gmt 0)
<form action="#"> might work or <form onsubmit="doWhatever(); return false;"> will probably meet your requirements. If you include a submit button on your form, the enter key will still work.