Page 1 of 1

WebGadget will not display image

Posted: Mon Jul 21, 2014 12:03 am
by reddon
Hi all,

I can't get the WebGadget to display image. The image(s) will only get displayed if the HTML code is saved as a file and I load the code as an url, like:

Code: Select all

OpenWindow(0, 5, 5, 500, 500, "")
WebGadget(0, 5, 5, 490, 490, "file:///Users/Mac/Desktop/file.html")
And file.html contains:

Code: Select all

<img src="Folder/ImgTest.bmp" />
But the WebGadget will not show the image if done like this:

Code: Select all

OpenWindow(0, 5, 5, 500, 500, "")
WebGadget(0, 5, 5, 490, 490, "")
SetGadgetItemText(0, #PB_Web_HtmlCode, "<img src='file:///Users/Mac/Desktop/Folder/ImgTest.bmp' />")
The img element just shows a white "element", but if the src has incorrect filename then the img element shows a questionmark.

I've tried different methods for hours - with no luck :(

Re: WebGadget will not display image

Posted: Wed Jul 23, 2014 1:36 pm
by reddon
Had to save the Html I in a file and then set the URL for the webgadget :-/