0

I have not found a solution for this on the internet, just some that don't work.

This is the problem:

function goto_checkout(){
  
  jQuery.ajax({
    type: 'POST',
    dataType: "JSON",
    url: checkouturl,
    success: function (data, textStatus, XMLHttpRequest) {
      jQuery.redirect(payments_url, data);
    },
    error: function (XMLHttpRequest, textStatus, errorThrown) {
        alert(errorThrown);
    }
});
}

The AJAX call returns a JSON object. Right now, I am then redirecting to a third-party website submitting my JSON object as POST data.

I don't want a redirect anymore, but I want my iFrame with id iFrame1 to go to the same website while submitting the same POST data there.

Please help me i am desperate

Jan v
  • 51
  • 4
  • [This](https://stackoverflow.com/questions/6730522/how-to-send-parameter-to-iframe-with-a-http-post-reques) might be of help – Shahzad Dec 04 '19 at 15:47
  • the problem is that i don't have a form. i am generating everything inside jQuery @ShahzadB – Jan v Dec 04 '19 at 15:56

0 Answers0