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

  • Home
  • SEARCH
  • 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 555603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:49:54+00:00 2026-05-13T11:49:54+00:00

Can I intercept/interrogate the form submission values using jQuery in the $(‘#formid’).submit(function() { });

  • 0

Can I intercept/interrogate the form submission values using jQuery in the $('#formid').submit(function() { }); call? I can’t check the value from the page as it’s the particular submit button pressed that I need to check. I’ve found this Link and it works in FF, but not in IE8, so that doesn’t help, unfortunately. I also don’t want to have to attach submit code to the buttons as I was hoping to make a generic bit of code I could plug into a whole set of forms.

Cheers

MH

  • 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-05-13T11:49:55+00:00Added an answer on May 13, 2026 at 11:49 am

    The latest jQuery 1.4 supports ‘live’ for submit events now — meaning you don’t have to attach individual handlers to all your forms. A nice example that covers what you’ve asked is given by Paul Irish here:

    http://jquery14.com/day-05/jquery-1-4-hawtness-1-with-paul-irish

    Here’s my own take:

    jQuery(document).ready(function() {
    
      var pageForms = jQuery('form');
    
      pageForms.find('input[type="submit"]').live('click', function(event) {
        var submitButton = this;
        var parentForm = jQuery(jQuery(this).parents('form')[0]);
        parentForm.data('submit-button',submitButton);
      });
    
      pageForms.live('submit', function(event) {
    
        // Prevent form-submission. You can do this conditionally later, of course
        event.preventDefault();
    
        // The form that was submitted
        var theForm = jQuery(this);
    
        // Detect which submit button was pushed
        var submitButton = theForm.data('submit-button');
        console.log('submitButton = ',submitButton.value);
    
      });
    
    });
    

    HTML:

    <form>
      <input type="submit" value="submit form 1" />
    </form>
    
    <form>
      <input type="submit" value="submit form 2" />
      <input type="submit" value="submit form 3" />
    </form>
    

    http://jsbin.com/equho3/6/edit

    EDIT – Sorry, I posted an example here that matched the one in your link! I’ve now provided a cross-browser solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 358k
  • Answers 358k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would say that if you don't really need something… May 14, 2026 at 2:15 pm
  • Editorial Team
    Editorial Team added an answer Nope, it's not hard - you just need to keep… May 14, 2026 at 2:15 pm
  • Editorial Team
    Editorial Team added an answer I found that setup.py for httplib2 seems to have an… May 14, 2026 at 2:15 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.