Inserting a picture in HTML

Hi,
I want to insert a picture into HTML document. ( Using NT 14.38 and C 11.1).
this code works:
'<p> <img src="C:\A\KEYDROP.JPG" alt="Picture of keys" </>' & '</p>'

BUT IT WILL NOT TAKE A VARIABLE for the name
'<p> <img src="loc:photoname" alt="Picture of keys" </>' (does not work…)

How can I use a variable name for photo to insert into the HTML?
THanks,
Ron

:backhand_index_pointing_up: This is HTML :backhand_index_pointing_up: , one is looking at the C Drive, the other is looking at an object called Loc:PhotoName.

This bit </>’ & ‘ is a clue.

' & ' is standard Clarion string splitting and joining, so maybe the Loc:PhotoName needs to be rewritten like so…

<img src=“' & loc:photoname & '” alt=“Picture of keys” </>’

?

You’re going to have a problem trying to get the web server to serve items other than from your WEB folder, Ron.

Take a look at the Net:f:Filename tag NetTalk WebServer - Basic Introduction and Techniques
or one of the other tags that would let you insert a snippet of text.

Or maybe try

<img src="/images/' & loc:photoname & '" alt=“Picture of keys”  />

Look at the XHTML code in any of the PageHeaderTags generated by the NetTalk wizard to see how it’s embedding an image.

Define “html diocument” in this case.
.htm file on the disk? NetWebPage procedure? NetWebForm?

Hi,
I want to insert the photos into an E mail. I am trying to put them in the Parameter: emLog:MessageHTML
Ron

You want to use CID:Image.ext.

https://www.capesoft.com/docs/NetTalk14/NetTalk3.htm#The_NetEmailSend_Methods

See the method EmbedImages.

This takes a working HTML file (ie double click to view in your web browser), and parses & processes the image location into the CID:Image.ext format and adds the image files to the HTML part of the email as an attachment.

I’m sure Capesoft did a demo app to show a working example. Its a long time since I’ve used Nettalk and some of it has changed alot.