0

I am opening a dialog box with custom width and height using the following code.

window.showModalDialog(" & _"'" & dlgURL & "',window,'dialogWidth:" & width & "px;dialogHeight:" & height & "px;overflow:auto;scrollbars:no;center:yes');"

The problem which I am facing here is , vertical and horizontal scroll bars are visible in the dialog box. Even if we scroll down, there is no contents. Can anyone tell me how to disable these scrollbars for Firefox browsers. I tried overflow:auto property. But no use.

Cyril
  • 1,216
  • 3
  • 19
  • 40
  • `I tried overflow:auto property` - auto means show scrollbars if required. Where did you look for info before asking here? – AD7six Apr 02 '13 at 09:11
  • @AD7six I was trying myself using the overflow property. As well as I am googling to find the answer for this . :( . Yes, Auto works when scrollbars is needed. But if you see here, the scrollbars is not displaying in IE, it is displaying only in FF. – Cyril Apr 02 '13 at 09:20
  • I tried your code with a sample page (that means: width and height less then dialog size) and I don't have scrollbars. – Draykos Apr 02 '13 at 09:22
  • @Cyril my point is that _if_ this setting had any effect - it would do exactly what you're seeing - show scrollbars. – AD7six Apr 02 '13 at 09:31
  • @AD7six. Apologize. Yes. The above ,It will show scrollbars, but I want to disable those scrollbars. – Cyril Apr 02 '13 at 09:39

2 Answers2

1

overflow does not seem to be a valid property for showModalDialog if you look at the specs: https://developer.mozilla.org/en-US/docs/DOM/window.showModalDialog

Try setting scroll to 0.

David Hellsing
  • 106,495
  • 44
  • 176
  • 212
0

This sample seems to work: no scrollbars on my FF.

http://jsfiddle.net/xA9Nm/1/

window.showModalDialog('http://www.december.com/html/demo/hello.html',window,'dialogWidth:600px;dialogHeight:500px;center:yes');

I suggest to check if, for some reason, the content inside the page is bigger then dialog size

Draykos
  • 773
  • 7
  • 16