I got everything working great within the _samples folder. I want to move the file out of the _samples folder. When I move the file out of the _samples file into a different location I keep getting error messeages relating to the basepath. I have tried to change the basepath to numerous thing but no such luck!
My file is currently saved in:
http://localhost:8500/sunchase/Admin/debug.cfm
The FCKeditor folder is located at:
http://localhost:8500/sunchase/Admin/FCKeditor/
<cfscript>
// Calculate basepath for FCKeditor. It's in the folder right above _samples
basePath = Left(cgi.script_name, FindNoCase('/admin/fckeditor', cgi.script_name)-1);
fckEditor = createObject("component", "#basePath#fckeditor");
fckEditor.instanceName = "myEditor";
fckEditor.value = 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.';
fckEditor.basePath = basePath;
fckEditor.width = "100%";
fckEditor.height = 300;
fckEditor.create(); // create the editor.
</cfscript>
ERROR MESSAGE
Parameter 2 of function Left which is now -1 must be a positive integer
Could someone explain to me what I am doing wrong?
Thanks in advance!
Tue, 01/24/2006 - 06:40
#1
RE: BasePath Problems
basePath = Left(cgi.script_name, FindNoCase('/admin/fckeditor', cgi.script_name)-1);
TO
basePath = "/sunchase/Admin/FCKeditor/";
And you should be fine.
RE: BasePath Problems
Error Occurred While Processing Request
Could not find the ColdFusion Component /sunchase/Admin/FCKeditor/fckeditor.
Please check that the given name is correct and that the component exists.
didgiman,
I tried to do what you said but I get this error?
I deleted the fckeditor and repasted the FCKeditor directory into:
http://localhost:8500/sunchase/Admin/
I even tried to remove the fckeditor in line 38.
The error occurred in C:\CFusionMX7\wwwroot\sunchase\Admin\test2.cfm: line 38
36 :
37 :
38 : fckEditor = createObject("component", "#basePath#fckeditor");
39 : fckEditor.instanceName = "mycontent";
40 : fckEditor.value = '#mycontent#
I really appreciate your help,
Thanks in advance,
Mark
RE: BasePath Problems
Mark,
I did the exact same thing as you described, and it works for me:
- Created directories: /sunchase/Admin
- Extract FCKeditor_2.2.zip into /sunchase/Admin
- Checked directories: /sunchase/Admin/FCKeditor. There should be a file called fckeditor.cfc
- Tried the sample at http://127.0.0.1:8500/sunchase/Admin/FC ... e02_mx.cfm
- That worked
- Copied sample02_mx.cfm into /sunchase/Admin and renamed it to debug.cfm
- Opened debug.cfm and changed line 67 to basePath = "/sunchase/Admin/FCKeditor/";
- Browsed http://127.0.0.1:8500/sunchase/Admin/debug.cfm
- Worked like a charm!
If you are still having problems with this, I suggest that you start again with a clean install, and follow the steps as described here.
Let me know how this works out for you.
RE: BasePath Problems
I hate this forum. It's impossible to post one single line of decent code here.
Make sure you change both ampersand quot; (") to single or double quotes...
RE: BasePath Problems
Thanks for your help it worked!!
Mark