Hi,
I have tried to make the base path dynamic by setting a jscript value equal to an asp variables' value (see code below. it works cus i use it all over the place for other things). The problem is when I actually try to set the BasePath equal to the jscript value ... it seems to DOUBLE the path value and I can't figure out why.
Using alerts, I determined that the jscript value is good, but when I look at the context-menu properties of the error page (within the editor iframe), it doubles the jscript path value in the URL.
The reason I need to do this is because I have to move the editor into a folder NOT at the root of my server. And I would like to keep this dynamic so I can simply change a DB value per site instead of hardcoding the path (which could get annoying if I have more than 3).
sample code:
<%
'I get the virtual path from the DB here and assign it
'to an ASP variable as a string.
virtual_path_value = recordsetPath("root_path")
%>
<script type="text/javascript">
//Here I assign the string value of the ASP variable
//to a jscript variable.
var jpath = "<%=virtual_path_value%>";
//create the object
var oFCKeditor = new FCKeditor("FCKeditortest");
//alert(jpath);
//set the base path
oFCKeditor.BasePath = jpath + "/FCKeditor/" ;
//alert(oFCKeditor.BasePath);
//construct the editor
oFCKeditor.Create();
</script>
I have tried to make the base path dynamic by setting a jscript value equal to an asp variables' value (see code below. it works cus i use it all over the place for other things). The problem is when I actually try to set the BasePath equal to the jscript value ... it seems to DOUBLE the path value and I can't figure out why.
Using alerts, I determined that the jscript value is good, but when I look at the context-menu properties of the error page (within the editor iframe), it doubles the jscript path value in the URL.
The reason I need to do this is because I have to move the editor into a folder NOT at the root of my server. And I would like to keep this dynamic so I can simply change a DB value per site instead of hardcoding the path (which could get annoying if I have more than 3).
sample code:
<%
'I get the virtual path from the DB here and assign it
'to an ASP variable as a string.
virtual_path_value = recordsetPath("root_path")
%>
<script type="text/javascript">
//Here I assign the string value of the ASP variable
//to a jscript variable.
var jpath = "<%=virtual_path_value%>";
//create the object
var oFCKeditor = new FCKeditor("FCKeditortest");
//alert(jpath);
//set the base path
oFCKeditor.BasePath = jpath + "/FCKeditor/" ;
//alert(oFCKeditor.BasePath);
//construct the editor
oFCKeditor.Create();
</script>
RE: setting BasePath