[jQuery] Re: Disable Submit
or you can bind to $("#your-form").submit(function({ ... }); if you're
making your JS unobtrusive
On Jan 16, 6:41 pm, Viz skillipedia <skillipe...@googlemail.com>
wrote:
> You will need just this tiny js script:
>
> function disableOnSubmit(form ){
>
> for (var i = 0; i < form.length; i++){
> var e = form.elements[i];
>
> if (e.type.toLowerCase() == "button" || e.type.toLowerCase()
> == "reset" || e.type.toLowerCase() == "submit") {
>
> e.disabled=true;
>
> }
> }
>
> }
>
> and then add :
>
> <form method="POST" action="/account" name="fm" onsubmit="disableOnSubmit(
> document.fm)" >
>
> That's all what you need - i think
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home