通过ajax将php page2加载到page1时,Javascript没有执行

I am beginner to php and Javascript. i am facing an issue that is i've a page say page1 which has two input fields and a button(Go).While clicking 'Go' the page2 populates on same page (page1) which has a data table. i am trying to implement JS on that Table BUT JS scripts are not Executing. (If i have a data table in a single page it works but upper scenario it does not).

Page1(Main page having inputs and button)

<script src="../javascript/file_history.js"></script>
<input name="advance_search" type="text" id="advance_search" size="26"  /> 
<input  name="button" type="button" onclick="showFileHistory()" value="Go"  />

The Other Page having data table on ajax call through JS

 <script src="../javascript/file_history.js"></script>
<script type="text/javascript" src="../javascript/gs_sortable.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">  
</script>
<script type="text/javascript">
    var TSort_Data = new Array('tbl_filemgtview','s', 'i','f');
     tsRegister();
     alert('This should be pop up');
         </script>  

   <table id="tbl_filemgtview">
    <thead id="thead"> <tr class="viewpage_heading">
      <th>Table heads </th></tr>
       </thead></table>

What should be there? or the way of executing Script tags which are getting by pass in page 2?

Possibly Its because the elements previously were not in the DOM and when you click on the button the elements manipulate the DOM so events firing like

$("#test").click(function(){
// Do something
});

Wont work, Now to make it work you need to use

$(document).on("click", "#test", function(){
// Do something
});

it would be better if you provide us Code or jsfiddle