Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ajax en Osscommerce


jesramgue

Recommended Posts

ENGLISH VERSION:

Hello, i'm trying to send an ajax petition (jquery) from an oscommerce server to another server (tomcat). The result it's always the same: FAILURE. My questions are: Do i include any cookie in request/response? How is the procedure to do this? This is my petition:

$url_ = "https://mylocalserver:8443/Test";

// fire off the request

var request = $.ajax({

url: $url_,

type: "post",

contentType: "application/x-www-form-urlencoded;charset=UTF-8",

data:'json=ceLWHyxfhAgFbok8W4B2xTupdam9pbkX5Wv/Eo3EfQ+c8z05VP8h4xCdRQhJohnyCZRxz0+3ktueGMh+coNNmL K16F83JXQSmYQz9j1RrNIwQnnryGvGGWLwwOWEVa79QaFFvhMn/0TyIaZTEWc5OA==',

success: function(datos){

alert("Hooray, it worked!" + datos);

//$("#result").html('submitted successfully');

},

error:function(erroraco){

alert("failure" + erroraco);

//$("#result").html('there is error while submit');

}

});

The petition to my tomcat server (localhost) is reaching well (i can debug it) but when i send the response to oscommerce, the response in oscommerce server side is empty. :-(

Please help mee!!!

PD: Sorry, my english is not so good...

 

 

SPANISH VERSION:

Ajax en Osscommerce

Hola estoy intentando lanzar una petición ajax (con jquery) desde un servidor osscommerce hacia otro servidor (tomcat) y siempre me llega la respuesta de la petición con fallo.

 

¿cómo puedo hacerla o como debo hacerla? ¿debo meter algun cookie en la respueta o algo?

 

Esta es mi petición:

$url_ = "https://localhost:8443/Test";

// fire off the request

var request = $.ajax({

url: $url_,

type: "post",

contentType: "application/x-www-form-urlencoded;charset=UTF-8",

data: 'json=ceLWHyxfhAgFbok8W4B2xTupdam9pbkX5Wv/Eo3EfQ+c8z05VP8h4xCdRQhJohnyCZRxz0+3ktueGMh+coNNmL K16F83JXQSmYQz9j1RrNIwQnnryGvGGWLwwOWEVa79QaFFvhMn/0TyIaZTEWc5OA==',

success: function(datos){

alert("Hooray, it worked!" + datos);

//$("#result").html('submitted successfully');

},

error:function(erroraco){

alert("failure" + erroraco);

//$("#result").html('there is error while submit');

}

});

 

La petición me llega bien a mi servidor y la proceso paso a paso correctamnete pero en cuanto cierro la respuesta ...siempre entra por " error:function(erroraco){"

 

Alguna ayuda?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...