Thanks all for your suggestions.  I am going to try them this morning
and will let you know how it goes!

On Feb 2, 6:42 pm, pedalpete <[EMAIL PROTECTED]> wrote:
> Hey klaus,
>
> I tried as you directed and placed it within the jquery form plugin,
> but it doesn't seem to be working, I am able to click the submit
> button multiple times.
>
> Any idea as to why this would not work with the plugin?
> [code]
>  $('#addForm').submit(function() {
>         // inside event callbacks 'this' is the DOM element so we
> first
>         // wrap it in a jQuery object and then invoke ajaxSubmit
>         $(this).ajaxSubmit(options);
>         $(this).bind('submit', function(){return false; });
>
>         // !!! Important !!!
>         // always return false to prevent standard browser submit and
> page navigation
>         return false;
>     });
> [/code]
>
> On Jan 31, 12:06 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > First of all you should keep in mind that a user can always submit a
> > form by hitting enter. Thus disabling the buttons only is more or less
> > useless. You should just alter the forms submit event, this is where
> > it all happens. That even works if you manually submit forms via
> > links.
>
> > Here's what I'd try - disable the form submit after the first submit
> > took place:
>
> > $('form').one('submit', function( ) {
> >     $(this).bind('submit', function() { return false; });
>
> > });
>
> > --Klaus
>
> > On Jan 31, 4:33 pm, brooke <[EMAIL PROTECTED]> wrote:
>
> > > Here is the situation.  We have a form that has links and when the
> > > user clicks on them it will submit the form.  The problem is that
> > > sometimes the users were doubleclicking or clicking on different links
> > > while the form was submitting.  I am completely new to jQuery but one
> > > of the programmers implemented the solution below.  What it is doing
> > > is binding a function that clears the onClick event when the link is
> > > clicked.  It works great in firefox but it is causing IE to lock up.
> > > I was thinking that somehow the timing is off and it is clearing the
> > > current anchors onClick before it can process the whole thing..
> > > (maybe??)  Below is the code.. any suggestions??
>
> > > sak10625_disabler = function(){
>
> > >    $("a, [EMAIL PROTECTED], [EMAIL PROTECTED]").attr("onClick",
> > > "");
>
> > > }
>
> > > $(document).ready(function(){
> > >         $("a").filter(function(){regexp=/submit\(\)/; return regexp.test($
> > > (this).attr("onclick"));}).bind("click", sak10625_disabler);
> > >    $("[EMAIL PROTECTED], [EMAIL PROTECTED]").bind("click",
> > > sak10625_disabler);
>
> > > });

Reply via email to