Hi,
Please help me with this question :
How to close the dialog from the parent window ?
Example : I have a page with fckeditor, user click on button on fckeditor toolbar, dialog is opened. Then user click on cancel button on parent window, at this time, I want to close the dialog.
Thank you,
Please help me with this question :
How to close the dialog from the parent window ?
Example : I have a page with fckeditor, user click on button on fckeditor toolbar, dialog is opened. Then user click on cancel button on parent window, at this time, I want to close the dialog.
Thank you,

Re: Close dialog from parent window
No one help
I am still trying to find out a solution...
I had a look at the class source/internals/fckdialog_gecko.js. There is a line of code that call the standard window.open() method
if ( !parentWindow ) parentWindow = window ; var oWindow = parentWindow.open( '', 'FCKeditorDialog_' + dialogName, sOption, true ) ; if ( !oWindow ) { alert( FCKLang.DialogBlocked ) ; FCKFocusManager.Unlock() ; return ; } oWindow.moveTo( iLeft, iTop ) ; oWindow.resizeTo( dialogWidth, dialogHeight ) ; oWindow.focus() ; oWindow.location.href = pageUrl ; oWindow.dialogArguments = dialogInfo ; // On some Gecko browsers (probably over slow connections) the // "dialogArguments" are not set to the target window so we must // put it in the opener window so it can be used by the target one. parentWindow.FCKLastDialogInfo = dialogInfo ; this.Window = oWindow ;They do not set the dialog window variable to the parent window.... So how can i get it
I tried to set oWindow to the parentWindow like this :
But then...I can not get it from the parent window....
The param parentWindow is always passed with NULL value...
I dont know if this parentWindow is the iframe that contains the FCKEditor area, or the main parent window...
Anyone can help me please , I am sure that there should be some way to do this....
This project is using version 2.4 FCKEditor....and I can not update to 3x....because they 've already built many things, plugins, toolbars...and stuffs like that..
Thanks for reading,
Re: Close dialog from parent window
This problem is solved.
The parentWindow is the FCKeditor Iframe on the actual parent window.
So all I have to do is from the actual parent window, get the iframe document, get the FCKLastDialogOpened variable then call close().
var f = document.getElementById('designTextarea___Frame'); var fDoc = f.contentWindow; fDoc.LastFCKDialogOpened.close();Regards,