Capturing AJAX on the Web Client
Hi All,
I’m capturing html as it download to a web client app. I programmatically click a checkbox and this triggers an ajax call to download additional none cache html. I want to use something like jQuery.ajax({ url: “redirected.html”, content: document.body});
Or something like:
String ajax = @"$('#cs-ZipCode').click(function(){
alert('in jquery');
$.ajax({
url: 'ajaxJQuery',
dataType: 'html',
error: function(){
alert('Error');
},
success: function(data){
alert('SUCCESS');
alert(data);
}
});";
to process the ajax code. Can you suggest a code snippet?
King
Re: Capturing AJAX on the Web Client
If you just want to grab the Ajax content and use it in place of the current body, then use the shorthand Ajax method:
Code:
$('body').load('redirected.html');
http://api.jquery.com/load/