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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:21:31+00:00 2026-05-31T17:21:31+00:00

I have two functions hooked on the submit event of a form. Each function

  • 0

I have two functions hooked on the submit event of a form. Each function is in a different place, and one function can affect the other.

How can I force one of these functions to be hooked with the lowest priority (ie. be the last to be executed)?

  • 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-31T17:21:32+00:00Added an answer on May 31, 2026 at 5:21 pm

    There are four ways I can think of:

    1. Manage the callbacks yourself, and only have one event handler that calls the functions in the desired order.

    2. In the function that is supposed to fired last, do the actual work in a zero-millisecond timeout. If all other functions work synchronously (and you can live with the final one not happening during the event bubbling), this will achieve the same thing.

    3. Bind the to-be-fired-last handler higher up in the DOM tree. You’ll have to test if that works with submit events; bubbling of these events doesn’t work in IE, but the jQuery docs mention that this has been normalized in jQuery. May be worth a try.

    4. Somewhat similar to 1., when binding any other handler than the low-priority one, unbind the latter, bind the new one, and finally re-bind the last-to-be-run.

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

Sidebar

Related Questions

I have two functions, one function calling the other. Below is a simple analogy
I have two functions in an ActionScript class, they are: private function loaderCompleteHandler(event:Event):void {
I have two functions, one which parses all the arguments sent to the function
I have two functions, one that creates a table like so: function return_formatted_results(result_no,addy,title,own_comment) {
I have two functions bound to a click event at two different times (using
I have two functions and i want to make it like one. function 1
I have two functions that i'm hoping i can put into one and can
I have two functions to submit to different sets of data to the same
Inside my view.py, I have two functions, one that processes input from a form
I have two functions to add and remove table rows that contain a 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.