

During the web development process I have noticed that the FCK editor is not loaded in some of the browsers. This article is published to help web designer, website developers or newbie to resolve such issues. Analyzing the code that had editor problems in some of the browser, I discovered that that the pages which used Absolute URL to load the editor, would display javscript error msg as “uncaught exception: Permission denied to get property Window.__FCKeditorNS“ and then the editor is not loaded.
Absolute URL refers to link that uses a full domain name. For example:
http://www.vujudesign.com . Absolute URL are sometimes blocked by some of the the browsers security settings. If you wonder why the editor is not loaded in all PCS then let me explain your concern through the following points.
If the security settings of some browser is high or no additional plugins is updated automatically with the latest upgrade version then the browser denies acess to the data to be fetched from absolute URL. Now there would be 2 solution for this problem. Either you advice client to update the browser and minimize the security settings so that the browser could accept the unsafe data to be fetched or replace the absolute URL for the editor with relative URL. I don’t think the first option would be feasible to you. Therefore the better option is to replace the absolute URL with the relative one.
The relative URL points to a file or directory in relation to the present file or directory for example (../../../Editor). The relative URL takes document root as a base for relating files. Therefore to indicate relative URL through out the file we have been using a variable $BasePath in our code that would refer to document root directory. for example ($BasePath = ‘../../../’). But for loading editors I found some of our application using absolute path such as “http://www…”.This would be more clarified through the following example:
Example code to demonstrate Problem with absolute path
sBasePath = “http://www.vujudesign.com/Editor/”; //Unsafe method to fetch data from absolute URL, hence cannot load config file due to secutiry warning on some browser
var oFCKeditor = new FCKeditor(’<editorname>’,'94%’,'400′);
oFCKeditor.BasePath = sBasePath;
oFCKeditor.Value=”;
oFCKeditor.Create() ;
Example code to demonstrate solution after replacement of absolute path with relative path.
$BasePath = ‘../../../’; //Points to root directory in the server
sBasePath = “<?=$BasePath?>Editor/”; //Safe method to fetch data through relative URL with reference to document root directory.
var oFCKeditor = new FCKeditor(’<editorname>’,'94%’,'400′);
oFCKeditor.BasePath = sBasePath;
oFCKeditor.Value=”;
oFCKeditor.Create() ;
August 12th, 2008 at 8:09 pm
I found your site on technorati and read a few of your other posts. Keep up the good work. I just added your RSS feed to my Google News Reader. Looking forward to reading more from you down the road!
August 14th, 2008 at 8:56 am
Your blog is interesting!
Keep up the good work!
July 15th, 2010 at 5:24 pm
Buy:Prevacid.Mega Hoodia.100% Pure Okinawan Coral Calcium.Petcam (Metacam) Oral Suspension.Human Growth Hormone.Prednisolone.Nexium.Synthroid.Actos.Lumigan.Arimidex.Zyban.Zovirax.Valtrex.Accutane.Retin-A….