//
you're reading...
HTML, Web Based

showModalDialog Properties & Sample

Creates a modeless dialog box that displays the specified HTML document.

Syntax

Copy
vReturnValue = object.showModelessDialog(sURL [, vArguments] [, sFeatures])

Parameters

sURL Required. String that specifies the URL of the document to load and display.
vArguments Optional. Variant that specifies the arguments to use when displaying the document. Use this parameter to pass a value of any type, including an array of values. The dialog box can extract the values passed by the caller from the dialogArguments property of the window object.
sFeatures Optional. Variant of type String that specifies the window ornaments for the dialog box, using one or more of the following semicolon-delimited values:
dialogHeight:sHeight
Sets the height of the dialog window (see Remarks for default unit of measure).
dialogLeft:sXPos
Sets the left position of the dialog window relative to the upper-left corner of the desktop.
dialogTop:sYPos
Sets the top position of the dialog window relative to the upper-left corner of the desktop.
dialogWidth:sWidth
Sets the width of the dialog window (see Remarks for default unit of measure).
center:{ yes | no | 1 | 0 | on | off }
Specifies whether to center the dialog window within the desktop. The default is yes.
dialogHide:{ yes | no | 1 | 0 | on | off }
Specifies whether the dialog window is hidden when printing or using print preview. This feature is only available when a dialog box is opened from a trusted application. The default is no.
edge:{ sunken | raised }
Specifies the edge style of the dialog window. The default is raised.
help:{ yes | no | 1 | 0 | on | off }
Windows Internet Explorer 7 and later. This parameter value is no longer supported. In earlier versions, this value indicates whether or not the dialog window displays the context-sensitive Help icon. The default value is yes.
resizable:{ yes | no | 1 | 0 | on | off }
Specifies whether the dialog window has fixed dimensions. The default is no.
scroll:{ yes | no | 1 | 0 | on | off }
Specifies whether the dialog window displays scrollbars. The default is yes.
status:{ yes | no | 1 | 0 | on | off }
Specifies whether the dialog window displays a status bar. The default is yes for untrusted dialog windows and no for trusted dialog windows.
unadorned:{ yes | no | 1 | 0 | on | off }
Specifies whether the dialog window displays the border window chrome. This feature is only available when a dialog box is opened from a trusted application. The default is no.

Return Value

A Variant that returns a reference to the new window object. Use this reference to script properties and methods on the new window.

For example this works:

showModelessDialog(‘dialog.htm’, window, ‘dialogWidth:350px;dialogHeight:250px;center:yes;status:false;help:false;resizable:false;scroll:false’);

This does not work:

showModelessDialog(‘dialog.html’, window, ‘dialogWidth:350px;dialogHeight:250px;center:yes;status:false;help:false;resizable:false;scroll:false’);

Other Sample 1 :

function fSpbHistory(bookid) {                
            var szUrl;
            var szFeatures;    

            var l_obj_argument = new Object();
            l_obj_argument.url = "spb/spb_participate.aspx?status=1&bookid=" + bookid;
            szUrl = "../modal.html";
            szFeatures = 'dialogWidth:800px; dialogHeight:600px; status:0; help:0; resizable=1;maximize:yes;minimize:yes;';

            window.showModalDialog(szUrl, l_obj_argument, szFeatures);
            document.Form1.submit();                                                                                            
        }     

Other Sample 2 :

function ShowdlgBDC_PrintDates() {
window.showModalDialog('<%=Page.ResolveUrl("~/Common   /Pbdc_dlgBDC_PrintDates.aspx")%>', 'Pbdc_dlgBDC_PrintDates',
'dialogHeight:580px;dialogWidth:700px;center=yes;scroll=no',
'dependent=yes, menubar=no, toolbar=no,status=no,modal=yes,scroll=no');
}

 

About berbagisolusi

Berbagi merupakan sebuah bentuk simbol keikhlasan untuk membantu dan menolong, sedangkan solusi adalah cara menyelesaikan masalah. Setiap manusia pasti mengalami masalah, tetapi kita tidak perlu mengalami masalah yang sama jika orang lain pernah mengalami dan kita tahu hal tersebut.

Discussion

One thought on “showModalDialog Properties & Sample

  1. how much traffic you receiving?? would you sell your site?

    Posted by Rhetoric Raiser | July 1, 2012, 8:34 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9 other followers

November 2011
M T W T F S S
    Dec »
 123456
78910111213
14151617181920
21222324252627
282930  

Archives

Web Statistic

Blog Stats

  • 149,580 hits
%d bloggers like this: