2017-10-09 117 views
0

我爲用戶輸入了一個表單,然後,我想將此輸入傳遞到另一個頁面並在彈出窗口中顯示新頁面。 這裏是我的代碼:如何將提交表單數據傳遞到彈出窗口

這是輸入頁面:

 <li><a href="javascript:void(0);$('#form1').submit();" onclick="window.open('${req.contextPath}/secure/Graph.jspa','popup','width=800,height=800');return false;" >Graph</a></li> 
     <li > 
      <form id="form1" method="post" action="${req.contextPath}/secure/Graph.jspa"> 
       <input type="text" 
         id="myfirstparameter" 
         name="myfirstparameter" 
         value="$textutils.htmlEncode(${myfirstparameter})" 

       /> 
     </li> 

然後在顯示頁面:

<p>The raw current parameter value is: $action.getMyfirstparameter() </p> 

所以點擊錨鏈接圖形之後。它應該彈出一個新頁面來顯示用戶的輸入。但對於我的代碼,它沒有顯示用戶輸入,它代替了默認值。

如果我刪除彈出功能(這是的onclick =「window.open ......),它會正常運行,但是,沒有彈出。 請幫我

回答

相關問題