Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
WebDialogWindow - Set Modal or nonModal from client-side
posted

hi ;

i am trying to set the size, position, and contentURL of a webmodaldialog from the client-side and i have successful set them. however, when i have the WebModalDialog set to Modal i get an error the first time i display the WebModalDialog. when the WebModalDialog is not set to modal, i do not get the error. 

the error occurs in 

switch(Sys.Browser.agent) {
    case Sys.Browser.InternetExplorer:
        Sys.UI.DomElement.getLocation = function Sys$UI$DomElement$getLocation(element) {
            /// <param name="element" domElement="true"></param>
            /// <returns type="Sys.UI.Point"></returns>
            var e = Function._validateParams(arguments, [
                {name: "element", domElement: true}
            ]);
            if (e) throw e;

                        if (element.self || element.nodeType === 9) return new Sys.UI.Point(0,0);

                                                var clientRects = element.getClientRects();
            if (!clientRects || !clientRects.length) {
                return new Sys.UI.Point(0,0);
            }

            var w = element.ownerDocument.parentWindow;
                                                var offsetL = w.screenLeft - top.screenLeft - top.document.documentElement.scrollLeft + 2;
            var offsetT = w.screenTop - top.screenTop - top.document.documentElement.scrollTop + 2;

                                                                        var f = w.frameElement || null;
            if (f) {
                                                                                var fstyle = f.currentStyle;
                offsetL += (f.frameBorder || 1) * 2 +
                    (parseInt(fstyle.paddingLeft) || 0) +
                    (parseInt(fstyle.borderLeftWidth) || 0) -
                    element.ownerDocument.documentElement.scrollLeft;
                offsetT += (f.frameBorder || 1) * 2 +
                    (parseInt(fstyle.paddingTop) || 0) +
                    (parseInt(fstyle.borderTopWidth) || 0) -
                    element.ownerDocument.documentElement.scrollTop;
            }

 the element.ownerDocument.documentElement is null. 

 i only get this on the first time i display the WebModalDialog and it only happens with IE. i have IE 6.0.

 here is the client-side code.

            objHelp.setSize( strWidth, strHeight ) ;           
            var resultVar = objHelp.set_moveable( true );   
            objHelp.set_initialLocation( true ) ;               
               
            objHelp.set_windowState($IG.DialogWindowState.Normal);  
           objHelp.get_contentPane().set_contentUrl("xxx.aspx?HelpCode=1");  

 

any ideas about the error and also am i able to set the Modal vs NonModal property from the client-side..

i would like to be able to use the same WebDialogWindow for both.

 thanks