请问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"> </td>
<td><html:button property="button" styleClass="btn_grey" value="保存" onclick="check(lessonForm)"/>
<html:button property="button" styleClass="btn_grey" value="关闭" onclick="window.close();"/></td>
</tr>
</table>
< /html:form>
在页面中用
<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"> </td>
<td><html:button property="button" styleClass="btn_grey" value="保存" onclick="check(lessonForm)"/>
<html:button property="button" styleClass="btn_grey" value="关闭" onclick="window.close();"/></td>
</tr>
</table>
< /html:form>
解决方案 »
- jsf2.0表单ID问题 急 急 急! ! !
- 在javascript脚本块中,把传过来的中文赋值给一个文本框控件,结果出现如下的乱码:百度
- jsp下载问题 点击文件的链接地址另存为如何实现
- 选择的难处
- 100分必须送出去 ,求一个树的实现(要具体代码)
- '姸'字在GBK下能显示,在GB2312下乱码,为什么?两种编码有什么区别,高手救命。
- 请高手指点一下我这个java的初哥,关于java调用oracle储存过程的问题?
- 日期计算的一个问题
- 在sqlserver2000的表中有smalldatetime类型的字段.......
- jsp兼exchange高手请进
- MyEclipse导入项目问题
- 关于提交一个servlet
<html:button property="button" styleClass="btn_grey" value="保存" onclick="check(lessonForm)"/>
改成
<html:submit property="button" styleClass="btn_grey" value="保存"/>试试啊!
<script language="javascript">
function check(form){
if(form.name.value==""){
alert("请输入课程名称!");form.name.focus();return;
}
form.submit();
}
</script>
直接先用你的那个jsp文件提交试试,说不定你的文件本身就不能提交,这样也可以看出是不是js问题,问题不一定是出在open上面~