I have a form that takes several seconds to run the javascript needed to prepare the form for PHP (selecting all items in a Select Multiple). Since it takes so long, I want to disable the Submit button and Change the text to "Please Wait..."
I have the code done, and it sorta works. FireFox3 does not seem to update the page until all JavaScript is done executing, so after the few seconds of nothing happening, then the button is disabled and the form is immediately submitted. IE7 actual does update the page, seeming after EVERY JavaScript line of code. It is ridiculously slow, but the button is disabled so I really don't care too much.
So how can I force the page to repaint in FireFox (preferably only once after the button is disabled) so the user is aware that something is happening (I just want to avoid them clicking the button multiple time and doing who knows what to the data). I would like to think that JavaScript has some sort of repaint or flush function I can call.
I appreciate any help.
I have the code done, and it sorta works. FireFox3 does not seem to update the page until all JavaScript is done executing, so after the few seconds of nothing happening, then the button is disabled and the form is immediately submitted. IE7 actual does update the page, seeming after EVERY JavaScript line of code. It is ridiculously slow, but the button is disabled so I really don't care too much.
So how can I force the page to repaint in FireFox (preferably only once after the button is disabled) so the user is aware that something is happening (I just want to avoid them clicking the button multiple time and doing who knows what to the data). I would like to think that JavaScript has some sort of repaint or flush function I can call.
I appreciate any help.
Comment