Re: Bug tracker web interface sometimes records submissions twic

看板DFBSD_bugs作者時間16年前 (2009/07/29 03:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/4 (看更多)
On Tue, Jul 28, 2009 at 04:56:06PM +0200, Simon 'corecode' Schubert wrote: > Does somebody know why firefox still allows the form to be submitted twice? The page contains this code: > > > <script type="text/javascript"> > submitted = false; > function submit_once() { > if (submitted) { > alert("Your request is being processed.\nPlease be patient."); > event.returnValue = 0; // work-around for IE Assignment to a property of non-existent `event' raises an exception, so submit_once() can't return false. try { event.returnValue = 0; // work-around for IE } catch (e) {} > return 0; > } > submitted = true; > return 1; > } > > function help_window(helpurl, width, height) { > HelpWin = window.open('http://bugs.dragonflybsd.org/' + helpurl, 'RoundupHelpWindow', 'scrollbars=yes,resizable=yes,toolbar=no,height='+height+',width='+width); > } > </script> > > ... > > <form method="POST" name="itemSynopsis" > onsubmit="return submit_once()" > enctype="multipart/form-data" action="issue1200"> > ...
文章代碼(AID): #1ARr8uZi (DFBSD_bugs)
文章代碼(AID): #1ARr8uZi (DFBSD_bugs)