Skip to content

Instantly share code, notes, and snippets.

@dmolsen
Created October 12, 2011 18:15
Show Gist options
  • Save dmolsen/1282062 to your computer and use it in GitHub Desktop.
Save dmolsen/1282062 to your computer and use it in GitHub Desktop.
simple test of an ajax success function
$.ajax({
url: "test.html",
dataType: 'xml',
success: function (data) {
$('#cancelPayment',data).attr('bar','element');
var str = (new XMLSerializer()).serializeToString(data);
$('#appDiv').html(str).trigger('create');
}
});
@haddnin
Copy link

haddnin commented Oct 14, 2011

Because I have no control over what the Java Developer is giving me (i.e.broken html), I ended up with a different solution:

$.ajax({
    type: "POST", 
    url: url,
    data: paymentStr,
    success: function(data) {

        var dataStorage = $(bpm.remoteAppDivName).html(data);

        $('#cancelPayment').attr('data-theme','d')

        dataStorage.trigger('create');
    }
});

Though I would share this with you. Thanx again!

@dmolsen
Copy link
Author

dmolsen commented Oct 14, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment