Chrome中的POPup问题 [英] POPup issue in Chrome

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

问题描述

HI,

i以前我曾经使用windows.showmodaldialog打开弹出页面,当我点击提交它时,在paents页面上显示的值显示没有任何回发



但现在我正在使用window.open,但它需要一个回发将该数据绑定到父页面

HI ,
i Have problme regarding popup in chrome previously i used to use windows.showmodaldialog which open the popup page and when i click submit it value show on the paents page without any postback

but now i m using window.open but it requires one postback to bind that data to parent page

推荐答案

请点击这里



窗口。 showModalDialog() - Web API | MDN [ ^ ]



想一想。

Please check here

Window.showModalDialog() - Web APIs | MDN[^]

Think about it.
Quote:

已弃用

此功能已从Web标准中删除。虽然有些浏览器可能仍然支持它,但它正在被删除。不要在旧项目或新项目中使用它。使用它的页面或网络应用程序可能随时中断。

Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.







并通过以下链接



javascript - 为什么不推荐使用window.showModalDialog?用什么代替? - 堆栈溢出 [ ^ ]


这不是你写的 Window.showModalDialog()。 JavaScript区分大小写,因此您编写的是错误的函数名称;此功能已被弃用:

Window.showModalDialog() - Web API | MDN [ ^ ]。



当然你可以使用 window.open 。我不知道它如何与回发有关。这些函数是JavaScript函数,根本与服务器端活动无关。



但是,从这个意义上讲,使用弹出窗口是一个坏主意。它不仅不够方便,而且经常在客户端被阻止。浏览器阻止弹出窗口的插件很受欢迎,主要是因为烦人的广告大大污染了网页。



在我的文章从零开始的模拟弹出窗口 [ ^ ]我讨论了一些更好的选择。



-SA
It's not what you wrote Window.showModalDialog(). JavaScript is case-sensitive, so this what you wrote is wrong function name; besides this function has been deprecated:
Window.showModalDialog() - Web APIs | MDN[^].

Of course you can use window.open. I have no idea how it can be related to postback. Those functions are JavaScript functions, not related to server side activity at all.

However, using popup, in this sense of this word, is a bad idea. Not only it is inconvenient enough, but it is often blocked on the client side. The browsers' plug-ins blocking pop-ups are very popular, mostly because of annoying ads contaminating Web greatly.

In my article Modal Popup From Scratch[^] I discuss some better alternatives.

—SA

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

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