Question

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 ?

Was it helpful?

Solution

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

try this

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

on PopUp.aspx

OTHER TIPS

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.net/t/1450847.aspx/1

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top