模态对话框中进行提交,提交后,在原来的模态对话框打开新的页面。

asdmusic8 2003-02-27 06:45:50
模态对话框中进行提交,
提交后,出现打开新的页面,但是,系统在新的ie窗体中打开了,我要在原来的
模态对话框中打开.替代原来的页面
...全文
103 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
xuzuning 2003-02-28
  • 打赏
  • 举报
回复
漏了一点,打开模态窗口用
var returnValue = window.showModalDialog("timeout.htm","",sFeatures) ;
xuzuning 2003-02-28
  • 打赏
  • 举报
回复
借qiudehuo(段云霄) 的例子,注意改变的地方

timeout.htm
含表单文件
<html>
<head>
<script>
name = "mywin"; // 给窗口命名
</script>
</head>
<body>
<form method="POST" action="timeout.jsp" target="mywin">
<input type="text" name="T1" size="20"><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</form>
</body>
</html>

asdmusic8 2003-02-28
  • 打赏
  • 举报
回复
1 为什么不要用iframe,
2 你说的方法也用了frame.html作为过渡不是直接用AddCard.html
zhanghk 2003-02-28
  • 打赏
  • 举报
回复
模态对话框可以提交给自己, 不过不要用iframe,用frame,我就是这样做的,把一个frame隐藏掉,另外一个提交的时候把taget="_self",就行了

frame.html

<frameset rows="0,*">
<frame src="about:blank" frameborder="0" noresize width="0" height="0" style="display: none;">
<frame src="AddCard.html" frameborder="0">
</frameset>

AddCard.html
...
<form action="frame.dll" method="post" target="_self" name="fr_card" id="fr_card" onsubmit="return check()" enctype="multipart/form-data">
...

提交后的页面也在对话框中出现
asdmusic8 2003-02-27
  • 打赏
  • 举报
回复
上面这个办法 真正打开的是timeout.htm ,并且 使 在timeout.htm操作后产生的页面替换了timeout.htm 。我就是这个意思,但它用到了dialog .htm,用它来过渡,

但是我有很多象timeout.htm 一样要求显示的页面,那我不就要用到很多对应的过渡表吗,那不是太浪费了,有没有更好的办法。
qiudehuo 2003-02-27
  • 打赏
  • 举报
回复
var sFeatures ="dialogHeight:300px;dialogWidth:500px;dialogTop:250px;dialogLeft:250px;help:no;status:no;scroll:no;dialogHide:1"
var returnValue = window.showModalDialog("/dialog.htm","",sFeatures) ;

dialog.htm:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>系统登录</title>
</head>

</script>
<body bgcolor="#e9e5d9" topmargin=3>
<IFRAME frameBorder=0 name=winshow2 target="_self" height="100%" src="timeout.htm" width=100%></IFRAME>
</body>
</html>

timeout.htm
含表单文件

<html>

<head>
</head>

<body>

<form method="POST" action="timeout.jsp">
<input type="text" name="T1" size="20"><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</form>

</body>

</html>
asdmusic8 2003-02-27
  • 打赏
  • 举报
回复
上面的文章我也看了,它是使新的页面不出现,而我是想要他打开新页面!!!,只不过是在原来的模态对话框,替代原来的提交页面。要看到新的页面。
孟子E章 2003-02-27
  • 打赏
  • 举报
回复
showModalDialog提交的问题,如何让其不出现新页面!!!
http://expert.csdn.net/Expert/topic/781/781508.xml?temp=.7678644
孟子E章 2003-02-27
  • 打赏
  • 举报
回复
http://www.csdn.net/Develop/read_article.asp?id=15113

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧