I'm trying to catch the input of the file/image browser so i may alter them before saving the value to the fckeditor control. For example, if a user enters this as the link:
/site1/pages/aboutus.htm
When they press ok to submit the changes, I want to intercede and change the input to:
/site1/?pages=aboutus
Where can I do this?
/site1/pages/aboutus.htm
When they press ok to submit the changes, I want to intercede and change the input to:
/site1/?pages=aboutus
Where can I do this?

Re: How to programmatically alter image URL & Links during s
function OpenFile( fileUrl )
{
fileUrl = encodeURI(fileUrl);
//Path modification below
if (this is a link creation?????) {
var tempLink = fileUrl.substring(fileUrl.lastIndexOf("/")+1);
fileUrl = "default.aspx?page=" + tempLink.substring(0, tempLink.indexOf("."));
} else if (this is an image insertion?????) {
fileUrl = fileUrl.replace(/(.*)images/i,"images");
}
window.top.opener.SetUrl( fileUrl ) ;
window.top.close() ;
window.top.opener.focus() ;
}
What i'm having trouble with is the if-else statement. How can I tell if the current process is for a link or for inserting an image? i tried using oConnector.ResourceType but that didn't work. This is where the "Browse Server" button is clicked and you see your list of files. I'm interception is before it sets the URL (whether it be for a link or image location). Can anybody help?
Re: How to programmatically alter image URL & Links during s
function OpenFile( fileUrl )
{
//Modified function
fileUrl = encodeURI(fileUrl);
var tempLink;
var ext = fileUrl.substr(fileUrl.lastIndexOf("."),fileUrl.length);
if (ext == ".html")
{
tempLink = fileUrl.substring(fileUrl.lastIndexOf("/")+1);
fileUrl = "default.aspx?page=" + tempLink.substring(0, tempLink.indexOf("."));
}
else
{
fileUrl = fileUrl.replace(/(.*)images/i,"images");
}
window.top.opener.SetUrl( fileUrl ) ;
window.top.close() ;
window.top.opener.focus() ;
}