window.showModalDialogdialogHeight/dialogWidth 似乎无法在 IE 8 中工作

发布于 2024-11-18 16:22:37 字数 578 浏览 3 评论 0原文

我工作的公司在 IE 6 上被困了 10 年,突然宣布我们的 Intranet 应用程序将迁移到 IE 8。快速浏览了一下,我们的 IE 8 似乎一切正常,但 window.showModalDialog 似乎有一个怪癖,我想知道是否有人可以帮忙?

基本上,下面的代码是在 IE6 中执行的,并打开一个我期望的宽度/高度的窗口:

//Set options
var sOptions = 'dialogWidth:247px; dialogHeight:181px; dialogLeft:100px; dialogTop:100px; status:no; scroll:no; help:no; resizable:yes';

//Open dialog
var oValue = window.showModalDialog(sURL, null, sOptions);

但是,在 IE 8 中(或者我猜是 IE 7,因为在 Intranet 应用程序上它将被强制为“兼容模式”)对话框以更大的宽度/高度打开。

有谁知道可能是什么原因造成的?我有一个模糊的想法,可能会强制执行最小宽度/高度,但我找不到任何文档来支持这一点......

Having been marooned on IE 6 for 10 years the company I work for has suddenly announced that we're migrating to IE 8 for our intranet apps. Having taken a quick look all seems to work fine in IE 8 for ours but there seems to be a quirk with window.showModalDialog that I was wondering if anyone could help with?

Basically the code below is executed in IE6 and opens up a window of the width / height I would expect:

//Set options
var sOptions = 'dialogWidth:247px; dialogHeight:181px; dialogLeft:100px; dialogTop:100px; status:no; scroll:no; help:no; resizable:yes';

//Open dialog
var oValue = window.showModalDialog(sURL, null, sOptions);

However, in IE 8 (or I guess IE 7 given that on intranet apps it will be forced to "Compatibility Mode") the dialog is opened with a larger width / height.

Does anyone know what might be causing this? I've a vague idea there might be a minimum width / height being enforced but I can't find any documentation to back this up...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文