On-demand validation using XHR

Balaji D Loganathan

21 sec read

The idea is to validate the username/password as soon as the user enters the data into the form input field of the browser.

The code snippets below will show how to do this using the XMLHttpRequest (XHR) object. The XHR (or so called AJAX) helps to do this without making the webpage reload after hitting the server.

Well, you can use famous JavaScript libraries like Prototype, dwr or Dojo to do this. Using them will also reduce the code size. But… if you are interested in knowing how this is really done using XHR directly, then read on…
more

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *