laziness, impatience, and hubris | |
PerlMonks |
CGI::Application submitting twiceby aukjan (Friar) |
on Jul 28, 2005 at 07:44 UTC ( [id://478865]=perlquestion: print w/replies, xml ) | Need Help?? |
aukjan has asked for the wisdom of the Perl Monks concerning the following question:
I just started working with CGI::Application and have run into a weird little snag. I have created a simple Module which has three run-modes. The first shows data from a database, the second shows an edit page and the third handles the submition of the second mode. This third mode does a redirect to the 1st page on succes and to the 2nd on failure (when the database returns an error, this is done with stored procedures). All works fine, but sometimes (for no appearent reason) the third mode is called twice after submitting the form (when only clicking the submit button once, yes I checked this). This became clear when I was getting errors from the database stating that data had already been deleted. The scripts itself are fairly simple and no special things are done. I have tested with the same data over and over again and there 'seems' to be no pattern whatsoever. I am not even entirely sure that this is an CGI::Application problem, but I am a bit in the dark on this one since it seems to happen randomly. Now I am just wondering if anyone has run into this problem and where I should continue looking... Update: seems to happen only when running the cgi from explorer. Update 2: -Hitting head on Table- Problem solved => I forgot a "return false;" in my calling the javascript submit function, and I kept reading over it! -Still hitting head on Table-
Back to
Seekers of Perl Wisdom
|
|