最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

asp.net - window.showModalDialog dialogWidth property not working in IE - Stack Overflow

programmeradmin2浏览0评论

I have a 2.0 framework ASP.Net page that runs in our controled environment (IE 7). The dialogWidth property seems not to be working. The scrip is as follows:

var win = window.showModalDialog ('Page.aspx', 'PopupPage', 'dialogHeight:600px,dialogWidth:800px,resizable:0');

The dialogHeight works fine but no matter what I change the dialogWidth to - it seems to be limited to a width of about 250px. In the configuration above the modal popup is higher that it is wide - even though width is 800 and height is 600.

I have a 2.0 framework ASP.Net page that runs in our controled environment (IE 7). The dialogWidth property seems not to be working. The scrip is as follows:

var win = window.showModalDialog ('Page.aspx', 'PopupPage', 'dialogHeight:600px,dialogWidth:800px,resizable:0');

The dialogHeight works fine but no matter what I change the dialogWidth to - it seems to be limited to a width of about 250px. In the configuration above the modal popup is higher that it is wide - even though width is 800 and height is 600.

Share Improve this question edited Sep 4, 2012 at 18:28 Linger 15.1k23 gold badges53 silver badges79 bronze badges asked May 21, 2009 at 20:23 Jim EvansJim Evans 6,50510 gold badges39 silver badges60 bronze badges 1
  • ??? unadorned has nothing to do with the question you asked. The problem was with the ma delimited arguments. It ignored all other arguments after dialogHeight. – Chetan S Commented May 21, 2009 at 20:45
Add a ment  | 

2 Answers 2

Reset to default 6

Try this:

var returnValue = window.showModalDialog(sUrl,'','unadorned:yes;resizable:1;
dialogHeight:550px;dialogwidth:985px;scroll:no;status=no');

Someone I work with had the same problem, and this fixed his problem...

The options must be delimited by semicolons, not mas.

var win = window.showModalDialog ('Page.aspx', 'PopupPage', 'dialogHeight:600px; dialogWidth:800px; resizable:0');
发布评论

评论列表(0)

  1. 暂无评论