petela
05-25-2004, 12:55 AM
I have a web form for viewers to complete and submt. I have written a javascript function which ensures that all fields are filled in prior to submittal. I have also written the ASP code which processes the form and writes the content to a database. So far, so good. The problem is that I have noticed that many viewers, for whatever reason, choose to hit the Submit button more than once. This, of course, results in multiple, identical fields in the database. I don't think it would do any good to write a statement at the bottom of the form instructing viewers to hit the Submit button only once. This would stop some from riding the Submit button, but
other would either not notice the statement or just ignore it.
What I am really looking for is a way to clear the form after the fields have been validated and the the form content has successfully been written to the database. I can write code which will validate the form AND clear the fields after submittal, but the problem is that the fields are cleared before
the entries can be written to the database. It seems that the best way to accomplish this is to have the form clear after a delay.
Has anyone encountered this problem in the past? Any ideas?
Thanks,
petela
other would either not notice the statement or just ignore it.
What I am really looking for is a way to clear the form after the fields have been validated and the the form content has successfully been written to the database. I can write code which will validate the form AND clear the fields after submittal, but the problem is that the fields are cleared before
the entries can be written to the database. It seems that the best way to accomplish this is to have the form clear after a delay.
Has anyone encountered this problem in the past? Any ideas?
Thanks,
petela