请问window.open弹出窗口后,里面的表单提交不了是怎么回事,
在页面中用
<td width="10%"><a href="#" onClick="window.open('manager/lesson_add.jsp','','width=292,height=175')">添加课程</a> </td>
弹出一个小页面,但在在小页面中提交数据却提交不了,
小页面中部分代码:
<html:form action="/LessonAction.do?action=lessonAdd" method="post" focus="name">
<table height="77"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="67" height="30" align="center">课程名称:</td>
        <td width="181">
          <html:text property="name" size="25"/></td>
      </tr>
      <tr>
        <td height="47" align="center">&nbsp;</td>
        <td><html:button property="button" styleClass="btn_grey" value="保存" onclick="check(lessonForm)"/>
&nbsp;
<html:button property="button" styleClass="btn_grey" value="关闭" onclick="window.close();"/></td>
      </tr>
    </table>
< /html:form>

解决方案 »

  1.   

    只提交表单吗?为什么要跳到js中提交呢,把
    <html:button property="button" styleClass="btn_grey" value="保存" onclick="check(lessonForm)"/>
    改成
    <html:submit property="button" styleClass="btn_grey" value="保存"/>试试啊!
      

  2.   

    JS  发上来看看!调用不对吧?别调用JS,直接提交试试!
      

  3.   

    check(lessonForm) 这个方法写的有问题吧,里面没有加 document.LessonAction.submit();提交语句吧
      

  4.   

    onclick="check(lessonForm)"有问题吧
      

  5.   

    js代码:
    <script language="javascript">
    function check(form){
    if(form.name.value==""){
    alert("请输入课程名称!");form.name.focus();return;
    }
    form.submit();
    }
    </script>
      

  6.   

    不用用window.open()
    直接先用你的那个jsp文件提交试试,说不定你的文件本身就不能提交,这样也可以看出是不是js问题,问题不一定是出在open上面~