打开showmodaldialog,如何刷新父窗口?
在一个frameset里,通过其中一个页面中的链接,打开模态窗口,此窗口中也是一个frameset,其中一个页面中有关闭按钮,点击后关闭此窗口,同时刷新链接所在的页面?
如何写?
问题点数:50、回复次数:17Top
1 楼meizz(梅花雪)回复于 2005-06-09 12:04:30 得分 20
showModalDialog('frame.htm',window,'dialogWidth: 480px; dialogHeight: 360px; status: no; help: no');
frame1.htm:
<input type=button value=close onclick="top.dialogArguments.location.reload(); top.close()">Top
2 楼blackcourser(潜心修炼)回复于 2005-06-09 13:03:44 得分 0
提示错误:top.dialogArguments为空或不是对象Top
3 楼mhj1119(fall)回复于 2005-06-09 13:45:39 得分 0
我觉得你没有把你要的东西描述清楚啊,"打开模态窗口"是一个新弹出的页面么?不太明白Top
4 楼ice_berg16(寻梦的稻草人)回复于 2005-06-09 14:02:12 得分 5
try
top.dialogArguments.location.reload()
=>
dialogArguments.location.reload();Top
5 楼myhyli()回复于 2005-06-09 15:59:30 得分 5
梅花雪写的top没错的,楼主说了modal窗口里也是frameset
楼主是不是没在showModalDialog的时候把window传进来?Top
6 楼blackcourser(潜心修炼)回复于 2005-06-14 10:58:54 得分 0
to myhyli() :
感谢你的提醒,将window传进去可以刷新父窗口了,可是在模态窗口内刷新FrameSet另一个帧里的页面,而且右键不起作用?Top
7 楼yonghengdizhen(等季节一过,繁花就凋落)回复于 2005-06-14 11:22:22 得分 5
模态窗口的顶级页使用frameset或iframe,若要刷新其它的frame中的页,只需要和正常窗口内包含的frameset或iframe那样刷新页面了.
需要注意的是模态窗口的顶级页面不支持导航,所有改变顶级页的导航动作将导致新开窗口(比如 <a target=_self>或<form target=_self>)Top
8 楼blackcourser(潜心修炼)回复于 2005-06-14 11:54:02 得分 0
使用top.FrameName.location.reload()或parent.FrameName.location.reload()都不起作用?Top
9 楼yonghengdizhen(等季节一过,繁花就凋落)回复于 2005-06-14 12:14:23 得分 0
不是top.location.reload()将导致新开窗口Top
10 楼blackcourser(潜心修炼)回复于 2005-06-14 13:34:48 得分 0
我这里不打开新窗口,而是什么反映也没有,好象没有执行过一样?Top
11 楼blackcourser(潜心修炼)回复于 2005-06-16 11:32:47 得分 0
to yonghengdizhen(等季节一过,繁花就凋落) :
应该怎么刷新?Top
12 楼Nikko0080(三缺浪人)回复于 2005-06-16 11:49:37 得分 5
在javascript里面
先showModalDialog
后location.reload();
关闭弹出的窗口后,自动会刷新
Top
13 楼blackcourser(潜心修炼)回复于 2005-06-16 12:07:17 得分 0
是在窗口里面刷新另一个帧的页面!
Internet Explorer has a couple non-standard extensions to the window object: window.showModalDialog() and window.showModelessDialog(), both of which create true dialog-type windows. These dialogs are much better suited than normal windows (as created by window.open()) for use in web applications.
Unfortunately, though, these dialogs have several annoying bugs and limitations:
Window targeting is broken, so new opening URLs always opens new windows (even when a target window is explicitly set). Each of these actions is affected:
Submitting forms
Opening hyperlinks
Programmatically using window.navigate(), window.location=url, window.location.assign(), window.location.reload(), window.location.replace()
The window.opener property is neglected. It should refer to the opening window object (where window.showModalDialog() was called), but is empty instead.
Keyboard shortcuts are disabled.
IE's context menu is disabled.
Cookies are inconsistently available in the dialog.
The CSS accelerator property is broken. It is simply ignored.
The document.title property is partially broken. It can only be set declaratively with <title></title> tags when the page loads, but not programmatically at runtime (actually it can be changed at runtime, but those changes are never shown in the dialog's titlebar).Top
14 楼afoskoo(暂停打印)回复于 2005-06-16 13:26:46 得分 5
showModalDialog('frame.htm',window,'dialogWidth: 480px; dialogHeight: 360px; status: no; help: no');
frame1.htm:
<input type=button value=close onclick="dialogArguments[0].top.location.reload(); top.close()">Top
15 楼yonghengdizhen(等季节一过,繁花就凋落)回复于 2005-06-16 17:33:46 得分 5
我说过顶级页面无法改变其location,只能通过客户端脚本更改页面内元素,比如document.write
<a target=_self我没试过,<form target=_self我是试验过的,至于你说的没响应我估计是正常的反应.Top
16 楼blackcourser(潜心修炼)回复于 2005-06-16 18:14:18 得分 0
看来只能改回用window.open了:(Top
17 楼fengjiehappychen()回复于 2005-06-30 11:51:57 得分 0
upupTop
相关问题
- showModalDialog()打开一个窗口,关闭打开的模式窗口后如何自动刷新父页面?
- 用showmodaldialog()打开一个新窗口,然后关闭时再返回值给父页面时,为何父页面会刷新?能不能不让它刷新?
- 用showModalDialog打开的窗口,在不关闭的情况下无法刷新父窗口吗?
- 用showModalDialog打开一个窗口,如果在关闭这窗口时刷新父窗口?
- showModalDialog("Qx_1.aspx")再一次打开不刷新怎么办?
- 如何刷新打开showModalDialog()的页面呢?急!!
- 用showModalDialog打开一个模窗口,刷新问题
- 如何刷新用showModalDialog打开的页面?
- showModalDialog 刷新父窗口的问题!
- showModalDialog刷新页面(不同参数),如何防止重新打开新窗口




