How to get content of other page using jQuery?

Posted by Poster under jQuery category on | Views : 12628
To get the content of other page using jQuery, you can use following code.

        <script type="text/javascript">
var contentText = $.ajax({
url: "default.aspx",
async: false

// to set the value of the content into a TextArea box,
// you can create a TextArea with id as defaultData and write following code
$("#defaultData").attr("value", contentText);

Above code will load the page content data asynchronously, to load the data synchronously replace the "async" to "sync".

Comments or Responses

Login to post response