Can you show us how the "//redirect" part of the code looks like?
It should be on the lines of something like:

setTimeOut(function() {
     location.href = '/somepage';
}, 2000);

On Mar 30, 4:05 pm, MonkeyBall2010 <hughes.timo...@gmail.com> wrote:
> Yeah, that was just a typo on my behalf... The actual code does list
> the correct code... Any idea what I am doing wrong?
>
> On Mar 27, 1:17 pm, James <james.gp....@gmail.com> wrote:
>
> > Javascript is case-sensitive:
> > 'setTimeOut' should be 'setTimeout'
>
> > On Mar 26, 5:08 pm, MonkeyBall2010 <hughes.timo...@gmail.com> wrote:
>
> > > I am using the validation plugin and the form plugin to validate my
> > > form and then submit the information via ajaxSubmit. I have everything
> > > working with the exception of my success callback function. Once the
> > > form is successfully validated I just want to wait about 2 - 3 seconds
> > > to run a script and then redirect the user to a new page. This works
> > > but the code is executed immediately:
>
> > > var options = {
> > >      success: createAccount,
> > >      clearForm: true
>
> > > };
>
> > >         $("#submitForm").validate({
> > >                 rules: {
> > >                                                //Insert Rules Here
> > >                 },
> > >                 messages: {
> > >                                                //Insert Messages Here
> > >                 },
> > >                 submitHandler: function(form) {
> > >                         jQuery(form).ajaxSubmit(options);
> > >                 }
> > >         });
>
> > > function createAccount () {
> > >      //Do Stuff
> > >      setTimeOut(//Redirect, 2000);
>
> > > }
>
> > > So instead of waiting 2 seconds to redirect the code is executed as if
> > > the timer isn't even there!! Can anyone please help me with this? I
> > > have tried everything and still the timer does not work!!- Hide quoted 
> > > text -
>
> > - Show quoted text -
>
>

Reply via email to