If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Why process forms with jQuery?

We use forms on the web to get input from our users. Sometimes we send that input to a server to save it, and sometimes we just do something interesting with it in the browser. We often use jQuery to help us process that form, either before sending to a server, or replacing the need for a server entirely.
We can use jQuery to do form "validation" - checking that inputs are the correct format, like the right phone number or length - and then send it off to a server. We do form validation in a few places on the Khan Academy settings page:
Screenshot of modifying the username on the settings page and getting an error about invalid characters
We can also use jQuery to create an in-browser quiz or game, like the exercises we have on Khan Academy:
Screenshot of selecting the right answer and seeing that it's correct
You'll use the same techniques for both of those sort of uses, and that's what we'll go through now. If you need a review of HTML forms first, go through these slides.
Note: Due to a browser bug, form processing won't work in IE 11 in our Khan Academy webpage environment. Please use a different browser if you're currently in IE 11.

Want to join the conversation?