<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Web Wiz Support and Community Forums : Add Image - relative link</title>
  <link>https://forums.webwiz.net/</link>
  <description><![CDATA[This is an XML content feed of; Web Wiz Support and Community Forums : Web Wiz Forums : Add Image - relative link]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 07 Apr 2026 23:40:45 +0000</pubDate>
  <lastBuildDate>Tue, 10 Feb 2004 08:33:42 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.08</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forums.webwiz.net/RSS_post_feed.asp?TID=9697</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Web Wiz Support and Community Forums]]></title>
   <url>https://forums.webwiz.net/forum_images/web_wiz_forums.png</url>
   <link>https://forums.webwiz.net/</link>
  </image>
  <item>
   <title><![CDATA[Add Image - relative link : This one&amp;#039;s a head scratcher....]]></title>
   <link>https://forums.webwiz.net/add-image-relative-link_topic9697_post51972.html#51972</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://forums.webwiz.net/member_profile.asp?PF=2924">skrile</a><br /><strong>Subject:</strong> 9697<br /><strong>Posted:</strong> 10&nbsp;February&nbsp;2004 at 8:33am<br /><br />This one's a head scratcher.&nbsp; Can't seem to weed through the codeto figure out what's happening.&nbsp; What I want to do is post imagesusing relative links (eg.&nbsp; &lt;a href="img/pic.gif"&gt;).&nbsp;The built in Add Image icon pulls up a dialog where an address of thepicture is entered and clicking submit puts the picture in thepost.&nbsp; However, if I put the relative link:&nbsp; "img/pic.gif" inthe dialog and press submit, the picture shows up fine, but thedatabase entry shows that an explicit URL was entered.&nbsp; If Ichange the database entry to be relative, the picture shows up fine.<br><br>So, I guess my question is, where in the world does the explicit URLoccur?&nbsp; I've dug into the RTE_image_window.asp file and found whatI suspect is the code I'm looking for:<br><br>If Request.Form("URL") &lt;&gt; "http://" AND Request.Form("URL") &lt;&gt; "" Then<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 'Initilise variable<br>&nbsp;&nbsp;&nbsp; strBuildImageHTML = ""<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 'Get form elements<br>&nbsp;&nbsp;&nbsp; strImageURL = Request.Form("URL")<br>&nbsp;&nbsp;&nbsp; strImageAltText = Request.Form("Alt")<br>&nbsp;&nbsp;&nbsp; strAlign = Request.Form("align")<br>&nbsp;&nbsp;&nbsp; intBorder = Request.Form("border")<br>&nbsp;&nbsp;&nbsp; If isNumeric(Request.Form("hoz")) Then lngHorizontal = CLng(Request.Form("hoz"))<br>&nbsp;&nbsp;&nbsp; If isNumeric(Request.Form("vert")) Then lngVerical = CLng(Request.Form("vert"))<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 'Build the HTML for the image insert<br>&nbsp;&nbsp;&nbsp; strBuildImageHTML = "&lt;img src=""" &amp; strImageURL &amp; """ border=""" &amp; intBorder &amp; """"<br>&nbsp;&nbsp;&nbsp; If lngHorizontal &lt;&gt; 0 Then strBuildImageHTML =strBuildImageHTML &amp; " hspace=""" &amp; lngHorizontal &amp; """"<br>&nbsp;&nbsp;&nbsp; If lngVerical &lt;&gt; 0 Then strBuildImageHTML =strBuildImageHTML &amp; " vspace=""" &amp; lngVerical &amp; """"<br>&nbsp;&nbsp;&nbsp; If strImageAltText &lt;&gt; "" ThenstrBuildImageHTML = strBuildImageHTML &amp; " alt=""" &amp;strImageAltText &amp; """"<br>&nbsp;&nbsp;&nbsp; If strAlign &lt;&gt; ""&nbsp; Then strBuildImageHTML= strBuildImageHTML &amp; " align=""" &amp; strAlign &amp; """"<br>&nbsp;&nbsp;&nbsp; strBuildImageHTML = strBuildImageHTML &amp; " /&gt;"<br>End If<br><br><br>'If the HTML has been built then run the following JavaScript<br>If strBuildImageHTML &lt;&gt; "" Then<br><br>Response.Write("&lt;script&nbsp; language=""JavaScript""&gt;")<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 'If this is windows IE 5.0 use different JavaScript<br>&nbsp;&nbsp;&nbsp; If RTEenabled = "winIE5" Then <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %&gt;<br>&nbsp;&nbsp;&nbsp; window.opener.frames.messageTD.focus();<br>&nbsp;&nbsp;&nbsp; var htmlLink =  window.opener.frames.messageTD.document.selection.createRang e()<br>&nbsp;&nbsp;&nbsp; htmlLink.pasteHTML('&lt;% = strBuildImageHTML %&gt;');<br>&nbsp;&nbsp;&nbsp; window.opener.frames.messageTD.document.execCommand('paste', false, '');<br>&nbsp;&nbsp;&nbsp; window.close();&lt;%<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 'Else use the following javascript<br>&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; %&gt;<br>&nbsp;&nbsp;&nbsp;  window.opener.document.getElementById("messageTD").contentWi ndow.focus();<br>&nbsp;&nbsp;&nbsp; var htmlLink  =window.opener.document.getElementById("messageTD").conten tWindow.document.selection.createRange() <br>&nbsp;&nbsp;&nbsp; htmlLink.pasteHTML('&lt;% = strBuildImageHTML %&gt;');<br>&nbsp;&nbsp;&nbsp;  window.opener.document.getElementById("messageTD").contentWi ndow.document.execCommand('paste',  false, '');<br>&nbsp;&nbsp;&nbsp; window.close();&lt;%<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; <br>Response.Write("&lt;/script&gt;")<br><br><br>But nowhere in this code is the explicit URL defined...or am I missing something?<br>]]>
   </description>
   <pubDate>Tue, 10 Feb 2004 08:33:42 +0000</pubDate>
   <guid isPermaLink="true">https://forums.webwiz.net/add-image-relative-link_topic9697_post51972.html#51972</guid>
  </item> 
 </channel>
</rss>