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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:11:21+00:00 2026-05-19T12:11:21+00:00

I am trying to chain ajax calls: when i load html content in all

  • 0

I am trying to chain ajax calls: when i load html content in all element i want load it in others. I would want to do without hardcode the calls in each element with closures attached to the local ajax events.
I tried to do with global ajax events like so:

$("#elem2").ajaxSuccess(function(e,x,opts) {
  var myUrl="server/elem2"
  if(conditionToAvoidRecursiveCalls)
    $(this).load(myUrl)
})

but i dont get how to define the conditionToAvoidRecursiveCalls: e.target!=this dont work and opts.url!==url dont avoid mutually recursive calls.

Is there another clever way?

  • 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-19T12:11:22+00:00Added an answer on May 19, 2026 at 12:11 pm

    Well the solution was simpler than i thougth, there is a option in ajax call which already do what i want (global:false):

    var html=$.ajax({url: url,global:false}).responseText
    $(this).html(html)
    

    global Boolean Default: true

    Whether to trigger global Ajax event
    handlers for this request. The default
    is true. Set to false to prevent the
    global handlers like ajaxStart or
    ajaxStop from being triggered. This
    can be used to control various Ajax
    Events.

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

Sidebar

Related Questions

I am trying to load a html page through UIWebview.I need to disable all
I'm trying to do the following method chain: $(somehtml).insertAfter(#someelement).fadeIn('slow'); What I would like to
I'm trying to chain criteria based on optional rails parameters. I want to be
I am trying to implement a decorator chain for my data-access based on IRepository.
Trying to keep all the presentation stuff in the xhtml on this project and
While trying to GET a JSON, my callback function is NOT firing. $.ajax({ type:GET,
I am trying to chain multiple compiled linq queries together. I have succeeded in
I am trying to chain a calendaer_date_select to a select field, so the select
I'm trying to chain two named_scopes in my User model. The first: named_scope :commentors,
I have a number of dropdown lists that I'm trying to chain together and

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.