I got this code from W3schools.. but I still wondering and figuring out anyone may know how can I include more then one field to check at the same time.. http://www.w3schools.com/ajax/ajax_source.asp they only show how to check one field.. anyone know any example what if I have 3 fields? like 1. Username - Ajax to check if username is duplicate on database 2. Email - Ajax to check email 3. Password - Ajax to check password
Since they use an onkeyup javascript event handler you can't hook the existing function up to any other fields. I'd suggest moving it to the submit button or onblur event handler for each field, and rewrite the function to be more re-usuable. I'm assuming your using it for validations, if so I'd suggest checking out mootools or prototype.js as well...