Re: Disabling button onclick in IE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 1, 2009 at 4:06 PM, Skip Evans <skip@xxxxxxxxxxxxxxxxx> wrote:
> Hey all,
>
> You probably remember me asking about disabling a submit button when it is
> clicked to prevent double clicks submitting  a form for CC processing.
>
> I put the following code into the submit button and it works fine on
> FireFox, but... hold your breath... not on IE.
>
> The button gets disabled but the form just sits there, not submitting. At
> first I just had
>
> onclick="this.disabled=true;"
>
> and that worked in FF also, but not in IE. Then I added the
>
> document.ticket_form.submit();
>
> But even that doesn't work with IE.
>
> Below is the whole snippet for the button.
>
> <input type="submit" name="submit" value="Purchase Ticket(s)"
> id="submit_tickets" onclick="this.disabled=true;
> document.ticket_form.submit();">
>
> Any suggestions would be greatly appreciated.
>

It looks like IE has an issue with your button being named "submit",
and is replacing the submit() method of the form with the element
named "submit". Try changing the name of the button.

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux