The complete solution:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Calling a long running page</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.ajax({
url: "LongRunningPage.aspx",
type: "POST",
context: document,
data: {
parameter1: "This is parameter1 value"
},
success: function (data) {
document.open();
document.write(data);
document.close();
}
});
}
);
</script>
</head>
<body>
<p><img src="ajax-loader.gif" alt="In progress" /></p>
</body>
</html>
By the way, I highly recommend this site if you need a progress info image for ajax calls.
No comments:
Post a Comment