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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:49:14+00:00 2026-06-02T21:49:14+00:00

I have the following inline code that I can’t change due is outputted by

  • 0

I have the following inline code that I can’t change due is outputted by a foreigner plugin. Contain a onclick handler that trigger the submit event:

<input type='button' id='gform_next_button_12_188' 
class='button gform_next_button' value='Next' tabindex='3' 
onclick='jQuery("#gform_target_page_number_12").val("2"); jQuery("#gform_12").trigger("submit",[true]); '/> 

I want to run some routines before submit the form and I tried this:

$("#gform_12").submit(function(e){

    // this code is not running ...

});

That it is failing, ie, my code is not running when form is submitted . Any suggest?

Final solution based on answers given

var inline_onclick_code_on_next = $(".gform_next_button").first().attr("onclick");
$(".gform_next_button").removeAttr("onclick");
$(".gform_next_button").bind("click", function() {
    myClass.autosave_on_click(inline_onclick_code_on_next);
});

myClass = {
    errorMessage : "",
    autosave_on_click: function (inline_onclick_code){
        my_gravity_form_saving_running = 1;
        myClass.saveData(); // this code must put my_gravity_form_saving_running = 0 when all data be saved
        countdown_max_loop = 10; // seconds
        var countdown = window.setInterval(function(){
            if (countdown_max_loop-- == 0 || my_gravity_form_saving_running == 0){
                clearInterval(countdown);
                eval (inline_onclick_code);
            }
        }, 1000);
    }
}
  • 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-02T21:49:23+00:00Added an answer on June 2, 2026 at 9:49 pm

    Try to unbind the click event from the element and then specify your own.

    $('#gform_next_button_12_188').unbind('click').removeAttr('onclick');
    $('#gform_next_button_12_188').bind('click', function() {
        // do magic stuff
    
        // do the rest
        jQuery("#gform_target_page_number_12").val("2");
        jQuery("#gform_12").trigger("submit",[true]); 
    });
    

    Edit:

    added removeAttr, thanks @gdoron

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

Sidebar

Related Questions

I have the following code <a href=#inline class=fancy id=item1>hello item1</a> <a href=#inline class=fancy id=item2>hello
I have the following that I execute inline on a number of screens: tinyMCE.init({
I have the following bit of code to set a parameter that will be
I have the following code... <h3>Guests</h3> <form class=form-inline> <fieldset> <label class=control-label for=input01>First Name:</label> <input
reading combase.cpp code, I find following: /* We have to ensure that we DON'T
I have the following function: inline auto iterateSomething(obj & o) { auto iterators =
Suppose I have the following HTML: <div id=test> <span style=display:inline;>foo</span> <span style=display:none;>bar</span> <span style=display:inline;>baz</span>
I have following code in my application: // to set tip - photo in
I have following code in my Application. Comments in my code will specify My
I have the following code defining a Functor template and the function running_op, which

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.