Subject Re: [firebird-php] Duplicate numbers
Author Lester Caine
Milan Babuskov wrote:

> Jochem Maas wrote:
>
>>ai, a submit handler - the first thing it does it disable to the submit button,
>>then is submits the form.
>
> I found that this doesn't work on some browsers (can't remember which one and
> which version), so I add an additional boolean flag to check:
>
> <input type=hidden name=clicked value=0>
>
> <input type=submit value=Go onClick="return check();">
>
> <script>
> function check()
> {
> if (document.form.clicked.value == 1)
> {
> alert('You already clicked. Please wait.');
> return false;
> }
> document.form.clicked.value = 1;
> return true;
> }
> </script>

Except the problem is

<a class="button" accesskey="A" href="ticketaddserve.php?enqno=0">Add
Ticket</a>

Runs ticketaddserve.php twice every time on a double click :(

--
Lester Caine - G8HFL
-----------------------------
L.S.Caine Electronic Services - http://home.lsces.co.uk
Model Engineers Digital Workshop -
http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php