Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. Form Elements and Validation > Canceling a Form Submission

recipe 9.7. Canceling a Form Submission

9.7.1. Problem

You want to cancel a form submission if you find the data entered into the form fields invalid.

9.7.2. Solution

If the form fields don’t validate, cancel the form submission event using the technique appropriate to the event handling technique you’re using. Here, we’re borrowing from Chapter 7 (where we covered events):


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial