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
Disabling form and loading in screen
Moderator: General Moderators
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.
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.