本人通过父页面的一个按钮弹出一个showModalDialog,但同时要将父页面上的值保存到Session中去,请问如何解决,按钮的写法是<input type=button class=button value="材料选择" onclick="window.showModalDialog('../include/iframe.jsp?URL=../mgr/addBillsGroup.jsp&scrolling=yes',window,'Dialogheight:800px;Dialogwidth:600px;status:no;help:no')" id=button1 name=button1>。谢了

解决方案 »

  1.   

    sevelet的问题?  没看出与sevelet的关联呀?你可加一个hidden, 在JavaScript中打开showModalDialog并传值<script LANGUAGE="javascript">
    function open_click() {
      document.form1.btnname.value = "...";
      window.showModalDialog(...);
      document.form1.submit();
    }
    </script><form name="form1" action="servlet1">
     <input type="hidden" name="btnname" value="">
     <input type=button onclick="open_click()">
    </from>
      

  2.   

    我现在的状况是这样:
    var dd=dataform.F_SEND_NAME.value;
    url='../include/iframe.jsp?URL=../mgr/addBillsGroup.jsp&scrolling=yes&F_SEND_NAME='+ dd
            window.showModalDialog(url,window,'Dialogheight:800px;Dialogwidth:600px;status:no;help:no')
    但是我在弹出来的页面中request.getParameter("F_SEND_NAME") 怎么还是取不到值啊
      

  3.   

      url='../include/iframe.jsp?URL=../mgr/addBillsGroup.jsp?a='+ aa + '&b='+ bb;
         window.showModalDialog(url,window,'Dialogheight:800px;Dialogwidth:600px;status:no;help:no')现在改成这种状况在子页面可以得到a的值,但是得不到b的,请问为什么啊,谢谢
      

  4.   

    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/dhtml_node_entry.asp
    ↑打開此頁在 Web Development >  HTML and CSS >  HTML and DHTML Reference >  Properties 有
    dialogArguments看「dialogArguments Property」中的例子