[Gambas-user] Data.Image WebTable (gb-web-gui)

Benoît Minisini g4mba5 at gmail.com
Tue Jul 6 13:18:54 CEST 2021


Le 06/07/2021 à 03:42, Herberth Guzman a écrit :
> Hi
> I have a web project (gb-web-gui)
> 
> I need to display an image in a webtable
> 
> the code:
> Data.Image = ("img/alert.png")
> 
> but it doesn't work, am I doing something wrong ..?
> 
> this code if it works
> Data.Html = "<img src=\"" & ("img/alert.png") & "\">"
> 
> The problem with this code is that it works fine at runtime.
> But when I compile and upload it to my server it doesn't show the image.
> 
> Can anybody help me.
> 
> Thanks
> 
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> 

The image file must be in the "Public" project folder so that it can be 
served through HTTP.

So, if you put Data.Image = "img/alert.png" (no parenthesis, this is not 
a translatable string), then the "alert.png" file must be in a "img" 
folder located in the "Public" folder of the project.

The URL associated with the file will be "http(s)://<application 
root>/img/alert.png", where "<application root>" is the name of your 
application executable as CGI script.

Regards,

-- 
Benoît Minisini


More information about the User mailing list