One of the most important events for validating and processing forms, is the …onchange event. It triggers when the content of a form …element changes. This is different than onfocus and …onblur, which fire when a field goes in and out of focus. …With validation, sometimes you'll need to use different types of events, so it's …nice to know that these can work well together. …Let's take a look at how we can use these events for validation. …So I have a simple form and it just has a URL field. …I want to make sure that if I have a URL, that at least it starts with an http://.…
So I'm going to be using the onchange method, and here's my HTML. …Can see that I've placed a span right here to accept errors for validation. …So I'm going to stat by creating a script tag. …And in my script bag, I'm going to target the My URL field. …So, I'll do document, the form, then get to the My URL field and then add the …onchange handler. This is going to execute a function …literal, which means just a function without a name. …
- Understanding forms
- Adding required fields and placeholders
- Accepting multiple entries
- Limiting uploads
- Handling focus changes
- Validating with regular expressions
- Working with older browsers
- Building jQuery validation
- Using server-side validation
- Sanitizing form input
- Uploading files
- Sending form data to a database
Skill Level Intermediate
Managing and Analyzing Data in Excel 2010with Dennis Taylor1h 32m Intermediate
1. Getting Started
2. Validating with HTML5
4. jQuery Form Validation
Understanding jQuery3m 47s
5. Working with PHP
6. Processing Form Data
Next steps1m 17s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.