[nycphp-talk] Premature submit
Anirudh Zala
arzala at gmail.com
Wed Oct 3 00:10:29 EDT 2007
On Wednesday 03 Oct 2007 06:30:04 Urb LeJeune wrote:
> Had a client who twice lost existing content while making a change
> using a CMS. Turns out the problem was they he was using a DSL line
> and he made a change and hit the "Submit Changes" button before the
> page had fully downloaded. Needless to say the undownloaded textarea
> fields were empty and were written to the DB.
>
> Is there a way to disallow a form submit before the entire form
> has downloaded?
Simplest solution is to keep submit button disabled by default, and then
enabling it by javascript when page is loaded.
Technically it can be done like this.
# While writing submit tag, keep it disabled by default.
# In the form where this button exists, put javascript code at the end of page
to make it enabled.
By this way until page will get reloaded, Submit button would not be available
in press/click mode.
Thanks
Anirudh Zala
>
> Thanks
>
> Urb
>
> Dr. Urban A. LeJeune, President
> E-Government.com
> 800-204-9545
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
More information about the talk
mailing list