(FCK version 1.6)
I have embedded a small piece of javascript in my fckeditor.html which detects the script pathname used by my CMS (content management system) and store it in a hidden input field, cgipath. (name'd and id'd as "cgipath")
Now I wish to access this variable from a dialog window, in particular, the fck_link.htm window.
I can't seem to work out the necassary DOM path (parent/document/window blah) to gain access to it - if it's at all possible that is.
Any ideas? I can't just move the script to the dialog html since it's not called via the "script executable directory".
I have embedded a small piece of javascript in my fckeditor.html which detects the script pathname used by my CMS (content management system) and store it in a hidden input field, cgipath. (name'd and id'd as "cgipath")
Now I wish to access this variable from a dialog window, in particular, the fck_link.htm window.
I can't seem to work out the necassary DOM path (parent/document/window blah) to gain access to it - if it's at all possible that is.
Any ideas? I can't just move the script to the dialog html since it's not called via the "script executable directory".
RE: Variables from fckeditor.html to dialog wins
FYI:
How to pass data back and forth between a window and a modal dialog?
Answer:
http://www.faqts.com/knowledge_base/vie ... 76/fid/124
RE: Variables from fckeditor.html to dialog wins
in js/fck_config.js - I added a new entry to the config object.
var cgipath = parent.location.pathname;
var offset = cgipath.indexOf("cosmos-lite");
var cgipath = cgipath.substr(0,offset-1);
//##
//## Detect CGI path (CosMoS Specific)
//##
config.CgiPath = cgipath;
then from the dialog/fck_link.htm
var cgipath = dialogArguments.config.CgiPath;
Voila. See - I had to answer my own sodding thread twice! How sad is that...