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

138
Vistas
ASP Classic include file using AJAX

I have a Bootstrap nav and I would like to change de content of the #result div using the Include.File from ASP Classic on click. Is there a way to do this?

HTML

<body onload="">
    <nav class="navbar navbar-light bg-light sticky-top shadow">
         span><%=rs(2)%></span>
                
         <ul class="nav nav-pills ml-4">
              <li class="nav-item">
                  <a class="nav-link" style="cursor: pointer;" id="solicitar" onclick="test('solicitar.asp')">Solicitar</a>
              </li>
              <li class="nav-item">
                  <a class="nav-link" style="cursor: pointer;" id="consultar" onclick="test('consultar.asp')">Consultar</a>
              </li>
         </ul>

         <a class="navbar-brand mx-auto" href="">
             <img src="../imgs/logos/4_COL-1.jpg" width="200" height="50" class="d-inline-block align-top" alt="">
         </a>

         <span><%=date%></span>
   </nav>

   <div class="container-fluid" id="result">
                
   </div>
</body>

JavaScript

function test(fileName) {
  $.ajax({
    method: "POST",
    data: {},
    success: function () {
      $("#result").html('<!--#Include File="' + fileName + '"-->');
    },
    error: function (x) {
      console.log(x);
    },
  });
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

To request a page via ajax you set the url parameter to the address of the page.
If successful you will get the page contents in the success function.
Used GET instead of POST since it was just a page request.

function test(fileName) {
  $.ajax({
    url: fileName,
    method: "GET",
    success: function (html) {
      $("#result").html(html);
    },
    error: function (x) {
      console.log(x);
    },
  });
}
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