简体   繁体   English

在window.showModalDialog中只需要垂直滚动条

[英]Need only Vertical scrollbars in window.showModalDialog

I have following code in - 我在以下代码中-

function getPopup1(redirectString) {

        var dialog = window.showModalDialog(redirectString , null,
'status:no;dialogWidth:700px;dialogHeight:900px;dialogHide:true;help:no;scroll:1');

    }

and the .aspx page has following code, on which I am redirecting- .aspx页上有以下代码,我在该代码上重定向-

<body style="background-color:White; padding-right:16px; padding-left:16px; width:650px" onload="ScrollData()">

I reffered, Stackoverflow Question Show only Vertical scrollbar in ModalDialog window? 我回答过,Stackoverflow问题在ModalDialog窗口中仅显示Vertical滚动条?

but, it is not working in my case. 但是,对于我而言,它不起作用。 Can anyone suggest, whats wrong in it? 谁能建议,这是怎么回事?

Please check this solution: 请检查以下解决方案:

http://forums.asp.net/t/1450847.aspx/1 http://forums.asp.net/t/1450847.aspx/1

did you make the div scrollable? 您是否使div可滚动? ie

<div style="position:absolute;top:0;left:0;width:100px;height:100px;overflow:auto;"></div>

also make sure that you do not have any element (table, div, span) in the the div who's width is greater than the container width + 25px (needed for vertical scroll bar) 还请确保div中的宽度大于容器宽度+ 25px(垂直滚动条需要)的div中没有​​任何元素(表格,div,跨度)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM