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 7984401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:15:29+00:00 2026-06-04T11:15:29+00:00

i have a form with this validation jquery $("#aioForm").on(‘submit’,function(e){ var errorCount = 0; $(‘span.errorMessage’).text(”);

  • 0

i have a form with this validation

jquery

$("#aioForm").on('submit',function(e){
        var errorCount = 0;
        $('span.errorMessage').text('');
        // checkign for multiple select [now you have one]
        var select = $('#addIO select').filter(function(){
            return this.selectedIndex == 0;
        }).next('span').text('Please select a cell');
        // checking for inputs
        var input = $("#aioForm input[type=text]").filter(function() {
            return !this.value;
        }).next('span').text("fill the name please");
        // no error checking
        if(input.length==0 && select.length == 0){
            $(this)[0].submit(); // submit form if no error
        }
        e.preventDefault();
    });

if there is no error i want to set the url to submit before submit , i mean before the statement

$(this)[0].submit();
  • 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-04T11:15:31+00:00Added an answer on June 4, 2026 at 11:15 am

    You need to use:

    $(this).submit();
    

    Edit: (After OP comments)

    If you want to submit your form with some specific values from javascript:

    Add two fields in your form like this:

    <input type='hidden' name='currentRelation' id='currentRelation'>
    <input type='hidden' name='currentConcept' id='currentConcept'>
    

    Now in jQuery you need to do this before submit:

    // Get values from HTML (According to your previous question)
    var ioAddConcept = $(".ioAddConcept").html();
    var ioAddRelation = $(".ioAddRelation").html();
    
    // Set these values to hidden fields
    $('#ioAddConcept').text( ioAddConcept );
    $('#ioAddRelation').text( ioAddRelation );
    
    // Now submit form
    $(this).submit();
    

    Now on server side:

    print_r( $_POST ); 
    // OR 
    print_r( $_GET );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this jQuery validation control in my form. It's working: $(#webform-client-form-45).submit(function(){ if($(#edit-submitted-name-surname).val() ==
I have this form submit code: Event.observe(window, 'load', init, false); function init() { Event.observe('addressForm',
I have a form that uses the excellent jQuery validation plugin. This is a
I have a form using jquery validation plugin. My submit button has an ajax
I have this registration form which is then validated using "bassistance's" validate.js: $('#pForm').validate({ rules:
So I have this jQuery Validation plugin, and it has a custom success message.
I have a form using jQuery 1.7 and jQuery validation 1.9 (latest each at
I'm new to jQuery but want to use this form validation plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ In
I'm using asp.net mvc 3 with unobtrusive jquery validation. I have a form that
I am using jquery validation plugin and zend framework. I have my form in

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.