61 ms·
Web form usability: Better form submission feedback with jQuery
Browsers fail to give users effective feedback when the user submits a form. Users respond by clicking the submit button over and over. The problem compounds when users find out they’ve been charged 5 times or when you receive 5 contact submissions. Bummer.
The solution is to replace the submit button with a friendly message letting the user know the form is working.
- ashishk 17y agoi might be missing something, but what is gained by using jquery? just use one line of jscript to replace the button with some text.
- treyp 17y agoyou're right about this. maybe just because it's readable and so many people already have jquery on their site. and i prefer just disabling the button $('input:submit',this).attr('disabled','disabled'); than replacing it with a paragraph, but it's up to you.
- seasoup 17y agoYou wouldn't use jQuery just to replace a button with some text on form submission. It's a big framework to load for something that small, but if you are already using jQuery then this link shows how to do it in jQuery.
- jasonkester 17y agoThat was my thought too. Why would I import somebody's 3rd party library to save myself typing document.getElementById once on this page? I'm sure jquery has its advantages for some things. Silly little javascript tricks like this don't seem to me like they qualify.
- briancray 17y agoReally great points about javascript everyone! I guess I figured it was better to show how to do it with jQuery because many people are interested in jQuery, and this code snippet gives them an extra idea how jQuery works. Thanks so much for your feedback!
- pibefision 17y agoCheck TypeKit.com. They have an excellent implementation on a simple subscribe form.