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

c# - Show only Vertical scrollbar in ModalDialog window? - Stack Overflow

programmeradmin1浏览0评论

I am using following code to open a modalwindow:

function OpenPopup(rn) {
     var winargs = null;
     var winsettings = "help:no;status:no;maximize:yes;minimize:no;dialogHeight:450px;dialogWidth:820px;edge:sunken;scroll:yes;center:yes;resizable:yes;";
     winargs = window.showModalDialog("../PopUp.aspx?id=" + rn , winargs, winsettings);
}

Here the property scroll provides only Yes and No option. I want only Vertical scroll bar and not Horizontal one. How should I achieve this ?

Can anyone help me on this issue ?

I am using following code to open a modalwindow:

function OpenPopup(rn) {
     var winargs = null;
     var winsettings = "help:no;status:no;maximize:yes;minimize:no;dialogHeight:450px;dialogWidth:820px;edge:sunken;scroll:yes;center:yes;resizable:yes;";
     winargs = window.showModalDialog("../PopUp.aspx?id=" + rn , winargs, winsettings);
}

Here the property scroll provides only Yes and No option. I want only Vertical scroll bar and not Horizontal one. How should I achieve this ?

Can anyone help me on this issue ?

Share Improve this question asked Nov 30, 2011 at 7:16 RMNRMN 7629 gold badges25 silver badges46 bronze badges 1
  • 2 try changing width to a higher value. – Mithun Satheesh Commented Nov 30, 2011 at 7:18
Add a ment  | 

3 Answers 3

Reset to default 2

Make sure that the width of PopUp.aspx is not more than the dialogWidth:820px;

try this

<body style="width:820px;">

on PopUp.aspx

Have you tried the following:

Specify the width to it:

<a href="javascript:popupWindow('http://example/english/images/buttons/button_invoice.gif', 600"></a>
function popupWindow(url, width)
{
    window.open('url', 'win_name', 'width=' + width);
}

And depending upon your layout, you could use the css as well:

<style type="text/css">
  overflow-x:hidden;
</style>

Source: stackoverflow

Please check this solution:

did you make the div scrollable? i.e.

<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)

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

发布评论

评论列表(0)

  1. 暂无评论