submitHandler: function(form) {
}
On Wed, Oct 28, 2009 at 12:52, StephenJacob <turnstylecreative@gmail.com> wrote:
Thanks Leonardo, I've tried to implement AjaxSubmit and the
Jquery.Post but have had no luck. The form keeps submitting the normal
way no matter what I do.
> To submit via ajax you could use this plugin:http://www.malsup.com/jquery/form/#apithen use:
On Oct 28, 7:48 am, Leonardo K <leo...@gmail.com> wrote:
> form.submit() just submit in the normal way.
>
>> On Tue, Oct 27, 2009 at 18:16, StephenJacob <turnstylecreat...@gmail.com>wrote:
> $(form).ajaxSubmit();
>
> or you can do by yourself withouth any plugin via jQuery Post:http://docs.jquery.com/Ajax/jQuery.post
>
>
>
>
> > Leonardo, I've been looking into the submitHandler option but i'm
> > having problems getting it to work correctly. Here is a sample of the
> > code i'm testing.
>
> > $("#signupForm").validate({
>
> > rules: {
> > fullname: "required",
> > company: "required",
> > phone: "required",
> > email: {
> > required: true,
> > email: true
> > }
> > },
> > messages: {
> > fullname: "Please enter your fullname",
> > company: "Please enter a company name",
> > phone: "Please enter a phone number",
> > email: "Please enter a valid email address"
> > },
> > submitHandler: function() {
> > form.submit();
> > }
>
> > });
>
> > <form class="cmxform" id="signupForm" method="POST"
> > action="process.php">
> > <div class="formline">
> > <label for="fullname">* Name:</label>
> > <input type="text" id="fullname" name="fullname"
> > class="textbox" />
> > </div>
> > <div class="formline">
> > <label for="company">* Company:</label>
> > <input type="text" name="company" id="company"
> > class="textbox" />
> > </div>
> > <div class="formline">
> > <label for="email">* Email:</label>
> > <input type="text" name="email" id="email" class="textbox" />
> > </div>
> > <div class="formline">
> > <label for="phone">* Phone:</label>
> > <input type="text" name="phone" id="phone" class="textbox" />
> > </div>
> > <div class="formline">
> > <label for="message">Message:</label>
> > <textarea name="message" id="message" class="messagebox"></
> > textarea>
> > </div>
> > <div class="formline">
> > <label for="button"></label>
> > <input type="submit" value="Submit" alt="Send Message" />
> > <input type="hidden" name="subcontact" value="1" />
> > </div>
> > </form>
>
> > On Oct 27, 1:42 pm, Leonardo K <leo...@gmail.com> wrote:
> > > Look the submitHandler option:
>
> > >http://docs.jquery.com/Plugins/Validation/validate#toptions
>
> > > On Tue, Oct 27, 2009 at 15:02, StephenJacob <turnstylecreat...@gmail.com
> > >wrote:
>
> > > > I'm trying to create a contact form using Jquery Validation and Ajax
> > > > Submit. I'm having a problem figuring out the best way to submit the
> > > > results to a php file. Below is a break down of my validation code.
>
> > > > $().ready(function(){
>
> > > > $("#signupForm").validate({
>
> > > > rules: {
> > > > fullname: "required",
> > > > company: "required",
> > > > phone: "required",
> > > > email: {
> > > > required: true,
> > > > email: true
> > > > }
> > > > },
> > > > messages: {
> > > > fullname: "Please enter your fullname",
> > > > company: "Please enter a company name",
> > > > phone: "Please enter a phone number",
> > > > email: "Please enter a valid email address"
> > > > }
>
> > > > });
>
> > > > });
No comments:
Post a Comment