Problem with the relative paths

Last post 06-30-2006, 11:48 AM by polmau. 2 replies.
Sort Posts: Previous Next
  •  06-30-2006, 6:04 AM 20611

    Problem with the relative paths

    Hi Support
     
    Sorry for my insistence, but I am willing to understand where is the problem referred to the relative paths.
    This was your initial answer to my problem:
    "That's the problems using relative path. When using the relative path,  it will work in some particular situations. When load the HTML code into the editor, if browser can't find the images when translating the relative path to aboslute path, it will not be able to show images."
    With this anwer you explain the effect but not the cause. Why is this a difficult problem!!.
    If I call the page using Internet Explorer its rendering is perfect!!
    For example suppose to include a relative path to an image in a page : <img src="/img/image.gif" />; later call the page using editor.LoadFile(path) where the path is "D:\Tex\Site\main.html".  Well, the path for the image in converted to "D:\Tex\img\image.gif" instead of ""D:\Tex\Site\img\image.gif" (I could know this using a http handler).
     
    Who is the cause of this wrong convertion ?
     
    Best regards
     
  •  06-30-2006, 8:47 AM 20617 in reply to 20611

    Re: Problem with the relative paths

    polmau,
     
    Can you explain the problems in more details?
     
    1. File structure
     
    2. Do you mean it works in IE instead of Firefox
     
    3. Can you post HTML code?
     
    This article may help:
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-30-2006, 11:48 AM 20629 in reply to 20617

    Re: Problem with the relative paths

    Hi Adam
     
    Your reply gives me the hope to have soon good news.
    Now I will try to explain the structure of my site and of the html page.
     
    Suppose to define a site at a specific URL: http://192.168.1.4/Site/Pages corresponding  to a physical path 'c:\Tex'.
    The structure of the folder Tex is:
     
    C:
       Tex
          Site
             Pages
                img
     
    Now in the folder 'Pages' is stored a page html 'index.html' so defined:
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE html PUBLIC "-//DVB//DTD XHTML DVB-HTML 1.0//EN" "http://www.dvb.org/mhp/dtd/dvbhtml-1-0.dtd">
    <html>
    <head>
    <title>Regione Veneto</title>
    </head>
    <body>
    <p><img src="img/foot.jpg" /></p>
    </body>
    </html>
     
    I try to edit this page using your editor .i.e. calling the method: editor.LoadFile(path) where path is equal to "C:\Tex\Site\Pages\index.html". Well the page is rendered without the effect of the image 'foot.img' beucase its relative path is translated erroneusly in 'C:\Tex\img\foot.jpg.
    Of course if I change the relative path in absolute path all is ok. Besides if I call I.E. with the URL: http://192.168.1.4/Site/Pages/index.htm the page is rendered successfully.
     
    Can you tell me about this problem ?.
     
    P.S.
    For sake of truth, when the editor shows the page above displayed in html code, it is rendered with the below code:
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <p><img src="img/foot.jpg"></p>
    As you can see some tags (body, head,title....) are lost. But I suppose this for an other my mistake!!
     
    Thank
    Best regards
     
     
     
     
     
     
View as RSS news feed in XML