Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
jquery .load() function recrusive

I have this code which is load the .aspx element the #maincontent div - it works but when I click another button witch is load the page same #maincontent div I see the console a lot of deal.aspx and ta.aspx loaded.

How can I do the one click one page load? or how to clear the recursive stack.

jquery code:

$("#tre").click(function () {
  $("#mainContent").load("subMenu1/deal.aspx");
});

$("#tra").click(function () {
  $("#mainContent").load("subMenu1/ta.aspx");
});

C# :

<div runat="server" id="mainContent"></div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I have a solution, but I made a mistake.

So When I call the .aspx I didn't notice that aspx file has got attached script file, what is include again this page calls

$("#tre").click(function () {  
 $("#mainContent").load("subMenu1/deal.aspx"); 
});
 $("#tra").click(function () {  
 $("#mainContent").load("subMenu1/ta.aspx"); 
});

> this caused the multiple page call. Now I fix the problem. Thanks for the help. It was very useful.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!