Archive for the ‘AJAX’ Category

Change URL by AJAX

December 18, 2012 Leave a comment

We can change the Content of current page to another page using AJAX.

JavaScript Code:

function ChangeURL()


/*change the content of div “contentForm2″ to content of page  ‘Scan.aspx’*/

$.ajax({url:’Scan.aspx’+’?rel=tab’,success: function(data){$(‘#contentForm2′).html(data);}});

//Change the URL to Scan.aspx

window.history.pushState({path:’Scan.aspx’},”,’Scan.aspx’);return false;


Unfortunately the scripts inside Scan.aspx are not running when it loaded in to the page.(I can’t see).

Categories: AJAX Tags: