WebHtmlViewer - How to show an image?


I swear, i tryed everything!

I drop a jpg file into my cgi project

Under debug mode and/or compiled, how should i access the image to show it inside a htmlviewer?

on a webbutton action, i wrote:

dim html as string
html = “

Anyone can tell me what is the correct pathToImage to use?

Best regards!


Use TPSF from Tim Parnell. All files you drag in the IDE are placed in the Resources folder, which it will help you locate.

TPSF has not been tested with Web! I’m unsure if it would.
Michel if you have advice for accessing files with Web Apps I’d be happy to include them into the module.

Hi Michel, Hi Tim!

That’s not my problem.

I know where the images are. There are on the same CGI directory.
app Libs
app Resources

I don’t know HOW is the correct path to pass to htmlViewer.


Oh, well does this not work then?

html = "<img src='images'/logo.jpg' />"

Sorry, I had not read well the channel.

It seems the Resources folder in Web does not contain the picture file.

The are NOT in the cgi directory either.

When the OP say “drop in the cgi project”, I hope he means he uses a copyFile step or some other mean to install the file in an Images subfolder.

Then something like this will do :

Dim f as folderitem = getFolderitem("").child("Images").child("Mypicture") Path = f.URLPath