Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

137
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda