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

159
Views
Url que se ha pasado a long

Estoy escribiendo este código para guardar una url en un archivo txt, que usaré también pasar después del mismo para invocar el botón compartir. mi problema viene cuando uso este código

 $.ajax({ url: "/condividi.php", dataType: "json", data: { res: osrm_result }, success: function(data, textStatus, jqXHR) { alert("ciaociao"); window.open("https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2F52.16.81.189%2Findex_gen.html&src=sdkpreparse"); } });

esto desencadena el error: URL demasiado larga, cómo puedo corregir esto para que funcione

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

el método predeterminado que usa jQuery es GET, que tiene una longitud de datos limitada, intente enviar los datos por POST (por supuesto, debe actualizar condividi.php en consecuencia para atender la solicitud POST):

 $.ajax({ type: "POST", url: "/condividi.php", dataType: "json", data: { res: osrm_result }, success: function(data, textStatus, jqXHR) { alert("ciaociao"); window.open("https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2F52.16.81.189%2Findex_gen.html&src=sdkpreparse"); } });
about 4 years ago · Santiago Trujillo 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!