Why Vuju Design

The widest range of services offered by Vuju Design is cheap website design, web development, web hosting, logo design, joomla cms, graphic design, search engine optimization and promotion and a lot more solutions under one roof. We offer our clients a full spectrum of professional yet affordable web development and website design aiming at powerful and effective presentation at the World Wide Web.

Joomla

Outsourcing Website Design Solutions

Outsourcing Website Design Solutions
If you are a web development company, web design agency or small business web design firm, and want to outsource your web site design looking for web design company in Nepal, then you are at right place.... More

Free Web Design Quote

  |   How to resolve multiple login problem from the same account ID using php ? »

Solution to resolve FCK editor loading problem for all browsers

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.

  1. Most of the browser marks unsafe to fetch certain data from absolute url such as image, editor and other web supporting files such as css and  javascript.
  2. Though the absolute URL is unsafe most of the browsers low security settings permits such data to be loaded.There are also some plugins automatically installed with the firefox updates or IE  that allows  unsafe data from Absolute URL to be fetched. Therefore some browser displays the data fetched from absolute URL even though they are marked as unsafe.
  3. There are also some plugins automatically installed with the firefox updates or IE  that allows  unsafe data from Absolute URL to be fetched 

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() ;

This entry was posted on Tuesday, July 1st, 2008 at 10:48 am and is filed under Solution. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Responses to “Solution to resolve FCK editor loading problem for all browsers”

  1. Alex Says:

    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!

  2. Alex Says:

    Your blog is interesting!

    Keep up the good work!

  3. MIGUEL Says:


    PillSpot.org. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. High quality pills. Buy pills online

    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….



Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word