模态Windows [英] Modal Windows

查看:50
本文介绍了模态Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮我创建模态窗口吗?我尝试使用window.showModalDialog,它可以打开模态窗口。但我面临以下问题。

1.从模态窗口提交时,它打开另一个窗口,它应该在提交发生的同一窗口中。

2.如何将值从模态窗口传递到父窗口。我尝试使用window.opener.document。 ....

但它抛出javascript错误


感谢您的帮助

Could anyone help me in creating modal windows? I tried using window.showModalDialog , it worked in opening the modal window. But I am facing the following issues.
1. On submit from the modal window, it is opening another window, it should be in the same window where submit happened.
2. how can i pass the values from the modal window to parent window. I tried using window.opener.document. ....
but it is throwing javascript error

thanks for ur help

推荐答案

您的代码似乎有问题?

showModalDialog()@ MDC
there seems to be something wrong with your code?

showModalDialog() @ MDC


但是我需要向父窗口返回多个值。这怎么可能。我在父窗口中有一些隐藏字段,我需要从模态窗口设置隐藏变量值。
But i need to return more than one values to the parent windows. how is it possible. I have some hidden fields in the parent window and I need to set the values to that hidden variables from the modal window..


将它们放入数组或对象中并返回它。另请参阅MSDN说明。
put them into an array or object and return this. see also the MSDN description.


这篇关于模态Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆