Well I can't tell if you're trying to use the validation plugin or
not.  I don't see any calls to the validate method on your page
anymore.  But if you're not using it then you need to change how
you're using ajaxForm.  If you pass just a function to ajaxForm then
that function becomes the success handler and will be invoked when the
server response is received.  If you need to do some minor validations
then you must pass an object to the ajaxForm method.  Something along
the lines of this:

$('#myForm').ajaxForm({
    beforeSubmit: myValidateFn
});

function myValidateFn(arr, $form, opts) {
    // perform validation here and return false
    // to prevent the form from being submitted
};

Mike


On Nov 4, 2007 9:03 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Mike thanks again,
>
> I tried the code you just posted but the only thing that happens is,
> it goes right to process.php. I'm trying to do this without a page
> refresh then show the animation. Any ideas i have tried so many way to
> get this to work and it seems theres alot of people who have had the
> same issue but nothing set that works most are going another way which
> is just going to another page but it there has to be a way
>
>
> On Nov 3, 3:20 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> > > > >         $('#subscribeform').ajaxForm(function() {
> > > > >                 $(this).validate();
> > > > >                     function runIt() {
> > > > >                                 $("#cover").fadeIn("fast");
> > > > >                                 $("#sform").fadeOut(10000);
> > > > >                     }
> > > > >                     runIt();
> > > > >         });
> >
> > I didn't realize you were using the validation plugin.  You'll need to
> > do something like this:
> >
> > $("#subscribeform").validate({
> >     submitHandler: function(form) {
> >         $(form).ajaxSubmit();
> >     }
> >
> > });
> >
> > More examples can be found here:
> >
> > http://bassistance.de/jquery-plugins/jquery-plugin-validation/
> >
> > Mike
>
>

Reply via email to