Question

Does anyone know why this isn't working in IE?

My code follows:

var xmlDocument = encodeURI('https://api.dc1.exacttarget.com/integrate.aspx?qf=xml&xml=<?xml version="1.0" ?><exacttarget><authorization><username>EXCATTARGET-USER</username><password>EXCATTARGET-PASS</password></authorization><system><system_name>subscriber</system_name><action>add</action><search_type>listid</search_type><search_value>17571300</search_value><search_value2></search_value2><values><Email__Address>test21@email.com</Email__Address><status>active</status><Full__Name></Full__Name><ChannelMemberID></ChannelMemberID></values><update>true</update></system></exacttarget>');

$('.triggerAjax').click(function() {

    $.ajax({
          type: 'POST',
          url: xmlDocument,
          dataType: 'jsonp'
        });
});
Was it helpful?

Solution 3

var xmlDocument = encodeURI('https://api.dc1.exacttarget.com/integrate.aspx?qf=xml&xml=<?xml version="1.0" ?><exacttarget><authorization><username>EXCATTARGET-USER</username><password>EXCATTARGET-PASS</password></authorization><system><system_name>subscriber</system_name><action>add</action><search_type>listid</search_type><search_value>17571300</search_value><search_value2></search_value2><values><Email__Address>test21@email.com</Email__Address><status>active</status><Full__Name></Full__Name><ChannelMemberID></ChannelMemberID></values><update>true</update></system></exacttarget>');

$('.triggerAjax').click(function() {

    $.ajax({
          type: 'POST',
          url: xmlDocument,
          dataType: 'jsonp'
        });
});

OTHER TIPS

I was experiencing the same problem in IE9. It's possible that you have the default jQuery ajax cache setting on... (it's on by default).

Try setting the ajax setup's cache to false at the beginning of your page's javascript:

$(document).ready(function() {
    $.ajaxSetup({ cache: false });
    // your other initialization work goes here...
}

I was having this same problem yesterday and that solved it for me. Hope this helps.

For further reading, check this link out: http://www.peteonsoftware.com/index.php/2010/08/20/the-importance-of-jquery-ajaxsetup-cache/

The SCRIPT5009: 'handleResponse' is undefined message is the result of not providing a callback function for the success event. You need to provide an executable method like below:

$.ajax({
    url: "http://api.dc1.exacttarget.com/integrate.aspx",
    data: { qf:'xml', xml:xmlDocument },
    dataType: "xml",
    success: function ( data ) {
        alert( data );
    }
});​
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top