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

103
Vistas
Outdated, broken AJAX request

Recently migrated files over, and updated ca.py to run in Python3 instead of Python2. I have this AJAX request and JavaScript alerts work right before it, but not after. There are no console or other errors, so I'm not sure what exactly is wrong. Code below:

alert(input);
      var request = $.ajax({
      url: "ca.py",
      type: "GET",
      data: {rule: ruleNumber, numSteps: numRows, inputVector: input},
      dataType: "html",
    });
    
    alert("request opened!");

The first alert of the input shows without issue. The second alert showing "request opened!" does not. Thanks in advance.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

This snippet demonstrates that your code basically works - even if the given url does not return anything:

// define some constants:
const input=123,ruleNumber=7,numRows=5;

alert(input);
  var request = $.ajax({
  url: "https://jsonplaceholder.typicode.com/users", // "ca.py",
  type: "GET",
  data: {id:7,rule: ruleNumber, numSteps: numRows, inputVector: input},
  dataType: "html"
});
alert("request opened!");
// further down:
request.done(function(dat){alert("received:\n"+dat)});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

And in case the url actually returns something then the .done() will also fire.

about 4 years ago · Juan Pablo Isaza Denunciar

0

Welp, it was one of those "oh my god" type of issues. Thanks to those who posted here - you helped me get much further in my debugging than I did on my own.

The issue is that my hosting platform needs a specifier for Python3. I received the following message back:

The following python binaries are available:

python3: Python 3.9.7 python3.8: Python 3.8.12 python3.9: Python 3.9.7

Please use the binary for the version of Python you want.

So, I changed my env from python to python3, and we're all set!

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