Page 1 of 1

Disabling form and loading in screen

Posted: Fri Mar 02, 2007 11:25 am
by Pezmc
I have just created a digital questionnaire for some year 7's at my school. However the school server is quite slow and the pages take quite a long time to load. Many of the year 7's click the submit button multiple times and wreck the database.
Recently I saw on a website a form that when you submitted it, it filled the screen with 50% opaque black. And in the middle it said loading..., how does this work, does anyone have the script, does anyone have a better solution?
Thanks in advance

Posted: Fri Mar 02, 2007 12:54 pm
by pickle
The simplest solution would be to set an onSubmit() action on the form that immediately disabled the submit button.

If you want fancier - like what you suggested - it'd just be a matter of using the proper CSS on a div, then making it visible when the form was submitted.