I would have put it in a function... but you can put it as an action if you want....such as
<input type="button" value="hi" onClick="document.formname.submit();" />
or in a function.. because I like to test the form values with javascript BEFORE submitting it to the server-side.
function check_values()
{
if (document.formname.sometextbox.value == "") {
alert("How About A Value in sometextbox buddy!?")
return;
} else {
document.formname.submit();
}
}
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Offline 2,413 posts
since Dec 2004