Converting links

Results 1 to 3 of 3

Thread: Converting links

  1. #1
    Chris tenDen Guest

    Default Converting links

    The title probably doesn&#039t do this problem justice but here it is anyways...<BR><BR>I have 2 pages, page 1 calls page2 via an include statement<BR><BR>Page1.ASP<BR>&#060;!---#include file="../articles/page2.htm"---&#062;<BR><BR>Page2.HTM<BR>&#060;html&#062;<BR> &#060;img src="graphic.gif"&#062;<BR>&#060;/html&#062;<BR><BR>Page 1 is not located in the same directory as page2.htm<BR>Graphic.Gif is located in the same directory as page2.htm<BR><BR>Of course the graphic will not be found because the web page thinks the graphic is in the same directory as page1.asp<BR><BR>I want to fool the browser into thinking it is coming from where page2.htm resides. I&#039d assume you&#039d have to use the addheader but I wouldn&#039t know what the syntax would be. Unfortunately I cannot move the graphic over.

  2. #2
    Cable Guest

    Default RE: Converting links

    Why not just write this code?<BR><BR>&#060;html&#062;<BR>&#060;img src="&#060;%=s_path & s_image_name%&#062;"&#062;<BR>&#060;/html&#062;<BR><BR>You can pass the s_path as the path to the image (I bet it is the same for all images so you can hardcode it?) and s_image_name for the filename of the image. <BR><BR>If you put that in your ASP page, you should not need to use an include file.

  3. #3
    Chris tenDen Guest

    Default RE: Converting links

    Unfortunately I cannot hard code it. It is for a publishing tool for idiots. The graphics have to remain with page. I cannot have a communal pot of graphics. But that is a moot point. I discovered the answer for all who are interested.<BR><BR>&#060;base href=""&#062;<BR>The above basically fakes the browser out.<BR><BR>My links from page1.asp get messed up, but they are hard-codable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts