Showing images in label

I have a label on my form which shows the following html

<img src="file:///%%file_name%%">

where file_name stores the image filename with full local path (the backslashes were replaced with forward slashes)

Afte I type in the above html and come back to Browse view, the error says “cannot set up form”

But the same thing works if store the full path with the word file:/// it works

eg: file_name_c = "file:///" + file_name (c:/my_images/a.jpg)

I then displays this field in the html text label as <img src="%%file_name_c%%">

Thanks
Ahmad

i have reproduced the problem. i am looking at it.

But one question. Why are you doing this? Storing a hard path? Because how do you get the images to the clients?

I’m having a function to bulk import images into the gallery file.

To ease the process when the user clicks the “Batch Import” button it opens up with the folder dialog.

I have a temporary table called “batch_import”

After the user chooses the folder the script loops all files in the chosen folder and creates records in the “bacth_import” table (one record for each file in the folder)

I store the chosen folder path in a global field called g_Selected_Folder
(eg: C:\Documents and Settings\Administrator\My Documents\My Pictures)

I store the filenames in the field called img_file_name (eg: image1.jpg)

Now I want to display the images in the label with the calulation

<img src="file:///%%g_Selected_Folder%%/%%img_file_name%%">

The user will scroll through the records and choose the ones he wants to import (be default all records will be tagged)

After he clicks confirm the records will be created in gallery with the images stored in media field

Hope this makes sense

If this is complicated no need to worry because I have another way of displaying too

Thanks
Ahmad

you will not get an error anymore. (2.0RC10)
But if the image can’t be found with that syntax you will get that default broken image…

Thanks Johan,

That’s great