-
Form submission - cancel
can somebody tell me how to cancel the submission of form?
thanks,
teeny
-
Re: Form submission - cancel
Teeny,
Just use a little JavaScript function with a condition to decide whether
to continue or cancel the form submission. Then on your submit button use
the onclick event handler to call your function:
function formHandler(formName)
{
if (condition1 == condition2)
{
formName.submit;
}
else
{
return false;
}
}
*button sample
<input type="submit" onclick="formHandler(document.formName);">
If your form still submits after being cancelled then add "return false"
after the semicolon following your event handler.
Michael
"teeny" <teeny12@hotmail.com> wrote:
>
>can somebody tell me how to cancel the submission of form?
>
>thanks,
>teeny
-
Re: Form submission - cancel
<form .... onSubmit="return false;">
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks