#:  (Alexandru Popescu) changed the world a bit at a time by saying on  
11/23/2005 1:32 AM :#
Hi!

I was wondering if anybody has succesfully used the DialogLink. I am having hard times to understand why it is not working as expected.

The dialog is correctly displayed, but the text is not updated on the main page. I have taken a look at the js, but it was really difficult to figure out what is wrong.

any hints are highly appreciated,

./alex
--
.w( the_mindstorm )p.


I haven't specified that this is happening only with Firefox (1.0.7 my version). And the code that is problematic is the following:

in general.js:

[code]
function mgnlOpenTreeBrowser(pathSelected, pathOpen, repository, width, height, 
callBackCommand){
        [...]
        var w=window.open(...);

        if (w){
                mgnlDebug("register call back function", "dialog");
                w.mgnlCallBackCommand = callBackCommand;
        }
}
[/code]

and than in dialog.js

[code]
function mgnlDialogLinkBrowserWriteBack(){
        var iFrameDoc=mgnlGetIFrameDocument('mgnlDialogLinkBrowserIFrame');
        var addressBar=iFrameDoc.getElementById("mgnlTreeControlAddressBar");
        
        // this should be allway the case
        if(window.top.mgnlCallBackCommand){
                mgnlDebug("mgnlDialogLinkBrowserWriteBack: calling callback function", 
"dialog");
                window.top.mgnlCallBackCommand.callback(addressBar.value);
        }
        
        window.close();
}
[/code]

In IE 6.0 SP2 the if branch is executed. In Firefox 1.0.7 it is not.

./alex
--
.w( the_mindstorm )p.

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to