2014-09-22 67 views
0

我是初學者到php和Javascript。我面臨的一個問題是,我有一個頁面說page1,它有兩個輸入字段和一個按鈕(Go)。當點擊'Go'時,頁面2填充在具有數據表的同一頁面(page1)上。我想在該表上實現JS,但JS腳本不是執行。 (如果我有一個數據表在一個單一的頁面上工作,但沒有上層情況)。Javascript在通過ajax將php page2加載到page1時未執行

第1頁(有輸入按鈕主頁)

<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" /> 

在Ajax調用其他頁面有數據表通過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> 

應該有什麼?或執行第2頁中通過的腳本標籤的方式?

+0

這裏居然是你showFileHistory()函數 – 2014-09-22 09:08:21

+0

@vimalpt在JS代碼中有我沒有問題。問題是它只是通過傳遞

相關問題