View Full Version : can I tell whether a form is being submitted
10-12-2011, 04:31 AM
I have a form called "theForm". How can I tell if the user has submitted the form or hit the submit button??
10-12-2011, 04:58 AM
<form action="xxxx.yyy" method="post" onsubmit="alert('call any function here'); return true;">
If you want to validate the form, at the same time, do something like
<form action="xxxx.yyy" method="post" onsubmit="return validateForm(this);">
and have validateForm return true if no errors or false for one or more errors.
You may do it dynamically, as well:
// do something
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.