2017-10-09 116 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 ......),它会正常运行,但是,没有弹出。 请帮我

回答

相关问题