prototype does supply some ajax helper classes...but not really a framework. Prototype really just adds additional functionally to the JavaScript language itself. It also provides helper classes for Strings, Arrays and Ajax. I have heard of ext.js, but I've never used it. I have used Mootools and Scriptaculous - which are JavaScript UI libraries. Yahoo also has some pretty neat JavaScript APIs.
As far as the submit button goes...what you can do is in your onBlur event or onChange (or whatever you're using) disable your submit button and change the text to "Validating..." (or whatever you want), then once your ajax callback method gets kicked off enable and change the text on your submit button. Actually, you wouldn't even need to disable the button...just check your flag when the user clicks the submit button and if that flag is set (and hasn't been reset by the ajax callback) give the user a message telling them that the form is still being validated....
you always want to be careful when using JavaScript to "turn off" submit buttons on forms....one thing to consider is, is it really worth making a separate HTTP request VIA ajax for EVERY form field...each Ajax request adds overhead to your application...so just keep performance in mind....it can make or break a web application.
|