My URL structure looks like this:
htp://server/edit_inc/ <- editing includes and files
/images/ <- image directory
/pages/ <- user pages.
I want to be able to place an image in the document with a relative URL of
../images/xyz.jpg but the Edit component only ever displays the broken image
symbol. If I save the document, then browse to a page in /pages/ and pull
that page out of the database, the image is displayed correctly, so the path
is correct.
I have tried the following techniques:
Placing a <base href="htp:/server/edit_inc/"> in the head
specifying contentElement.BaseUrl = "htp:/server/edit_inc/" when the edit
object is created.
I can solve the problem by using absolute paths, but I don't want to do
this, as often clients are entering real data into a preproduction staging
server prior to the real server going live. Relative URL keeps the data
portable between websites.
Thanks in advance,
Adrian
TTFN
"Adrian Cope" <a...@NOSPANadriancope.net> wrote in message
news:#JvSa5brBHA.2208@tkmsftngp05...
thanx
"Adrian Cope" <a...@NOSPANadriancope.net> wrote in message
news:Odz8SEcrBHA.1864@tkmsftngp07...
I use apache/PHP webserver - the <?=$doc_copy?> is the output from a
database and has been stripped of newlines, and has had quotes backslashed.
<?=$doc_path?> is the the current path, i.e. http://myserver/images/
You can do the same thing easily in ASP, or in JavaScript on the client
side.
function MENU_FILE_OPEN_onclick() {
tbContentElement.documentHTML= "<?=$doc_copy;?>"
tbContentElement.BaseURL="<?=$doc_path?>"
tbContentElement.focus();
tbContentElement.BrowseMode = true;
}
function init()
{
preLoadedDoc= document.frm.sArea.value; // eFre -- editable DIV
document.frm.sArea.value= self.opener.document.frm.TEXT.value;// textarea
with source code
eArea.innerHTML = document.frm.sArea.value;
eArea.document.designMode = "On"
////////
eArea.document.BaseURL = bas;
eArea.BaseURL = bas;
document.BaseURL = bas;
////////////////////////////
}
Dont work for me :((( when i try to change source code of TAG(img, a href)
in textarea to relative, after swiching to edit mode it converts to absolute
:(((
"Adrian Cope" <a...@NOSPANadriancope.net> wrote in message
news:eP3qQJ1rBHA.2224@tkmsftngp03...