cross domain $.ajax call only works when javascript alert()

cross domain $.ajax call only works when javascript alert()

Hi knowledgeable people

   
function ajaxaddress(theForm) {

    cb = "createorder=true" + "&";
    cb = cb + "delivery=" + theForm.delivery.checked+ "&";
    cb = cb + "deliveryname=" + theForm.deliveryname.value;

    $.ajax({
      type: "GET",
      url: "http://myurl/post-order.php",
      data: cb,
      dataType : "jsonp"
    });

//alert("here");

}


This function does not call my post-order.php script UNLESS I uncomment the alert("here") line when everything starts working fine. I'm attempting to send back address data across to my non SSL server from a SSL https third party server. The php script inserts a row to a database and does so as long as the alert() is issued.

I'm new to JQuery and love it for its AJAX functions and use the $.get function elsewhere successfully on my website. I'm pretty sure I need to do things this way to get a cross domain AJAX call to work with JQuery.

What am I missing? Any help would be gratefully received.
    • Topic Participants

    • jim