How do I open a html document using showModalDialog with scroll bar

Posted on 2005-05-03
Last Modified: 2008-01-16
The user create a word document and save it as a html format. Eg. CompanyPolicy.htm

In our ASP web page, I use showModalDialog to open the html document and set scroll= yes. But it does not show the scroll bar. Please help. this is urgent.

My code below.

function OpenDialogue(iDialogueFile) {
  if (window.showModalDialog)
     var sRtn;
     var = "CompanyPolicy.htm"
     sRtn = showModalDialog(DialogueFile,"","center=yes;dialogWidth=600pt;dialogHeight=400pt;scroll=yes");
Question by:LeanMoreTryMore
    LVL 6

    Expert Comment

    Here you can see the Parameters for showModalDialog hope it helps you out
    LVL 6

    Expert Comment

    <INPUT TYPE="button" VALUE="Launch Window" onClick="if (window.showModalDialog) { window.showModalDialog('modalurl.html', window) } else { alert('This method is only supported by Internet Explorer 4 and above.') }">

    Author Comment

    Very thank iscode.
    scroll bar appeared. but ONLY vertical bar
    I want both vertical bar and horizontal bar.
    any idea i can do it
    LVL 6

    Accepted Solution

    you might like this too

    <script type="text/javascript">
    function doDialog(){
    var x=window.showModelessDialog('page.htm','','dialogHeight: 200px; dialogWidth: 400px;  edge: Sunken; center: Yes; help:No; resizable: Yes; status: Yes; scroll:yes')

    <a href="javascript:doDialog()">Dialog</a>
    LVL 6

    Expert Comment


    just notice I sent showModelessDialog
     change it to showModalDialog :)

    hope this helps

    Expert Comment

    I want only Vertical Scrolbar with showModalDialog.

    Please help.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now