0

I have a problem with the command Execommand javascript that uses a component in Delphi. Order inserthtml used to insert a code in a html editor html.Quand throws this command with the following code ** <img heigth =" 305 "src =" C: / Pictures / Erreur.png "align =" top "width =" 931 ">****

I see html code has changed the image link relative that the <img heigth="305" src="../../../Pictures/Erreur.png" align="Top" width="931">. you have a solution to keep the real link of the image?

user653395
  • 59
  • 1
  • 9
  • 2
    This doesn't make much sense to me but the fact that your question includes `heigth` and the spurious spaces in the filename suggest you have failed to include the real code. – David Heffernan Jun 08 '11 at 08:04
  • What Delphi component are you talking about? Is `Execommand` something you do from Delphi code, or from JavaScript? What was the expected `src=` for your image? You really need to add a lot more details, and should probably **copy-paste** the relevant parts of your Delphi code. – Cosmin Prund Jun 08 '11 at 08:47
  • I Played the component is geckobrowser (a component based on the Gecko SDK). yes I use the command with delphi Execommand geckobrowser because the component has an interface to this command. In fact I generate the HTML code to insert an image. – user653395 Jun 08 '11 at 09:16

1 Answers1

0

Working as designed. When the domain of the page your working on matches that of an inserted image an absolute URL is changed to be a relative URL. To keep full URLs put the images on another domain (or drive letter in this case). The SUBST command can be used on a Windows command prompt to make another drive letter point to C: if you don't want to move stuff around. To let C: be accessible as I: so your image links can start with I: use the following:

SUBST I: C:\
Brian
  • 6,717
  • 2
  • 23
  • 31