Hi,
I have been using this editor for some time now but am comming across what some would consider a serious error.
The function "Window_OnBeforeUnload()" is causing major errors for me. It is located in the "editor/js/fck_startup.js" file.
I am running win2000 with IE6.
The error is a js error alert : 'null' is not an object or is null
I narrowed it down to these 2 lines within this function.
1.
line : FCKToolbarSet.Collapse();
occurs : With No other "DIV"'s on the same page
temp solution : comment this line /*FCKToolbarSet.Collapse();*/
2.
line : while (e=d.getElementsByTagName("DIV").item(i++)){...}
occurs : With other "DIV"'s on the same page.
temp solution : none found.
I have not modified the code in any way, shape or form.
I am also using FCKeditor in a production system and have tested this bug with and without modifications to no usable result.
My contract ends this week and I don't want to leave them with this error so any help would be extremly nice.
Jael
I have been using this editor for some time now but am comming across what some would consider a serious error.
The function "Window_OnBeforeUnload()" is causing major errors for me. It is located in the "editor/js/fck_startup.js" file.
I am running win2000 with IE6.
The error is a js error alert : 'null' is not an object or is null
I narrowed it down to these 2 lines within this function.
1.
line : FCKToolbarSet.Collapse();
occurs : With No other "DIV"'s on the same page
temp solution : comment this line /*FCKToolbarSet.Collapse();*/
2.
line : while (e=d.getElementsByTagName("DIV").item(i++)){...}
occurs : With other "DIV"'s on the same page.
temp solution : none found.
I have not modified the code in any way, shape or form.
I am also using FCKeditor in a production system and have tested this bug with and without modifications to no usable result.
My contract ends this week and I don't want to leave them with this error so any help would be extremly nice.
Jael
RE: Error : function Window_OnBeforeUnload()
Would you or someone else who has succeeded in making this work post the actual try catch block? I know I am missing something simple, but I just don't see it.
Thanks.
RE: Error : function Window_OnBeforeUnload()
RE: Error : function Window_OnBeforeUnload()
function Window_OnBeforeUnload(){FCKToolbarSet.Collapse();var e;for (var j=0;j<aCleanupDocs.length;j++){var d=aCleanupDocs[j];var i=0;try {while (e=d.getElementsByTagName("DIV").item(i++)){if (e.FCKToolbarButton) e.FCKToolbarButton=null;if (e.FCKSpecialCombo) e.FCKSpecialCombo=null;if (e.Command) e.Command=null;}} catch (e) {};i=0;try {while (e=d.getElementsByTagName("TR").item(i++)){if (e.FCKContextMenuItem) e.FCKContextMenuItem=null;}} catch (e) {};aCleanupDocs[j]=null;d=null;};};
RE: Error : function Window_OnBeforeUnload()
Check out
https://sourceforge.net/tracker/index.p ... tid=543653
I ended up putting try catch blocks around the offending lines as suggested, and this fixed the problem for me.
RE: Error : function Window_OnBeforeUnload()
RE: Error : function Window_OnBeforeUnload()
// On IE, some circular references must be cleared to avoid memory leak.
function Window_OnBeforeUnload()
{
FCKToolbarSet.Collapse() ;
var e ;
for ( var j = 0 ; j < aCleanupDocs.length ; j++ )
{
var d = aCleanupDocs[j] ;
var i = 0 ;
try
{
while ( e = d.getElementsByTagName("DIV").item(i++) )
{
if ( e.FCKToolbarButton )
e.FCKToolbarButton = null ;
if ( e.FCKSpecialCombo )
e.FCKSpecialCombo = null ;
if ( e.Command )
e.Command = null ;
}
}
catch (e)
{}
i = 0 ;
try
{
while ( e = d.getElementsByTagName("TR").item(i++) )
{
if ( e.FCKContextMenuItem )
e.FCKContextMenuItem = null ;
}
}
catch (e)
{}
aCleanupDocs[j] = null ;
d = null ;
}
}
RE: Error : function Window_OnBeforeUnload()
I can not find the function Window_OnBeforeUnload ANYwhere in the fckeditor directory, and the solution given in the other thread does not make sense.