Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8856407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:21:00+00:00 2026-06-14T14:21:00+00:00

I am using form validation plugin as well as html5 attribute=recquired with input type=button

  • 0

I am using form validation plugin as well as html5 attribute=recquired with input type=button or submit and fancybox.when button is clicked ,both validation proceedures work(notification of empty inputs appeare),but instead of this notification ,form is submitted.

If I dont use button.click function but use simple submit.then validation works perfectly

plugin==http://validatious.org/

javascript function

   $(document).ready(function() {

    $('#send').click(function() {

    $(this).attr("value", 'Applying...');


    var id = getParam('ID');
    $.ajax({
        type:'POST',
        url:"send.php",



        data:{option:'catapply', tittle:$('#tittle').val(), aud:aud, con:con, adv:adv, mid:$('#mid').val(), aud2:aud, cid:$('#cid').val(), scid:$('#scname option[selected="saa"]').val(), gtt:$('input[name=gt]:radio:checked').val(), sr:$(":input").serialize() + '&aud=' + aud},

        success:function(jd) {
            $('#' + id).fadeOut("fast", function() {
                $(this).before("<strong>Success! Your form has been submitted, thanks :)</strong>");
                setTimeout("$.fancybox.close()", 1000);
            });
        }
    });
  });
 });

AND Html is here

      <form id="form2" class="validate" style="display: none" >

        <input  type='button'  value='Apply' id="send" class="sendaf validate_any"                              name="jobforming"/>
     </form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:21:01+00:00Added an answer on June 14, 2026 at 2:21 pm

    EITHER have a type=”button” and not a type=”submit” OR what I vastly prefer, run on form submit instead of on click. the preventDefault (or return false at the end of the function) will stop the normal form submission UNLESS there is a syntax error in the code! For example what is aud and con?

    Try

    $(document).ready(function() {
    
      $("#form2").on("submit",function(e) {
        e.preventDefault(); // stop normal submission
    
        $('#send').attr("value", 'Applying...');
    
        var id = getParam('ID');
        $.ajax({
          type:'POST',
          url:"send.php",
          data:{option:'catapply', tittle:$('#tittle').val(), aud:aud, con:con, adv:adv, mid:$('#mid').val(), aud2:aud, cid:$('#cid').val(), scid:$('#scname option[selected="saa"]').val(), gtt:$('input[name=gt]:radio:checked').val(), sr:$(":input").serialize() + '&aud=' + aud},
    
          success:function(jd) {
            $('#' + id).fadeOut("fast", function() {
              $(this).before("<strong>Success! Your form has been submitted, thanks :)</strong>");
              setTimeout("$.fancybox.close()", 1000);
            });
          }
        });
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that contain a submit button. I'm using form.validation plugin I
I'm using the jQuery validation plugin and the form uses ajax to submit the
I am using jquery validation plugin for form validation. I have added a custom
I'm try to validate form using jquery validation plugin my from code: source code
I'm using the Jquery Validation plugin to validate my form on the client before
I'm using the validation plugin of jQuery to check some values of my form.
I'm using a jquery validation plugin First I add the validation to the form:
I am validating form using jquery validation plugin...... rules: { Name: required, MobileNo: {
I am using the JQuery Validation plugin for client side form validation. In addition
I am using the jquery validation plugin (bassistance.de/jquery-plugins/jquery-plugin-validation/id) for a bit of client-side form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.