Hi, I've been going round in circles on this all day (searching, try/test/debuging) so thought at least I'd ask..
I want to change the BaseHref I have set in my fckconfig.js at runtime. I've tried the following things without any luck.
This next attempt gets the BaseHref of the main document and changes it.. I'm sure now (pretty sure anyway) that the relevant bashref is the EditorDocument's so I tried that next.
bit of jQuery in there so if anyone wants DOM version let me know..
Now I'm thinking I'll need to do a post back. Can anyone verify this for me.
I want to change the BaseHref I have set in my fckconfig.js at runtime. I've tried the following things without any luck.
FCK.Config.BaseHref = document.location.protocol+'//'+document.location.host+'/RealiseIT/AuthoringTool/userfiles/'+FCK.sUserName+'/'+sPackageName+'/'+'file/' ;
FCK.Config["BaseHref"] = document.location.protocol+'//'+document.location.host+'/RealiseIT/AuthoringTool/userfiles/Frank/hugot/file/' ;
This next attempt gets the BaseHref of the main document and changes it.. I'm sure now (pretty sure anyway) that the relevant bashref is the EditorDocument's so I tried that next.
$('base').each( function() { $(this).attr('href', document.location.protocol+'//'+document.location.host+'/RealiseIT/AuthoringTool/userfiles/'+FCK.sUserName+'/'+sPackageName+'/'+'file/'); } );
$(FCK.EditorDocument).find('base').each( function() { $(this).attr('href', document.location.protocol+'//'+document.location.host+'/RealiseIT/AuthoringTool/userfiles/'+FCK.sUserName+'/'+sPackageName+'/'+'file/'); } );
bit of jQuery in there so if anyone wants DOM version let me know..
Now I'm thinking I'll need to do a post back. Can anyone verify this for me.
Re: Dynamic, Programmatic, Runtime BaseHref
If you mix everything at once it will be much harder for you.
Re: Dynamic, Programmatic, Runtime BaseHref
Would I be right in saying that setting the property FCKConfig.BaseHref has no effect after the startup phase because the configuration functions that read the value have already done their job - unless there is a way to re-execute these functions?
Re: Dynamic, Programmatic, Runtime BaseHref