[RPG] How to show a image in a html file

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
Taku Izumi
Posts: 11
Joined: Tue Jul 09, 2013 9:23 pm

[RPG] How to show a image in a html file

Post by Taku Izumi » Wed Aug 07, 2019 8:32 pm

Hi,

I am trying to show a image in a html file.
So, I created the following codes, however a image set to the resource property of Webview is not shown.
Sample.html and emploee_128.png are in resource folder.
I use iPhone for testing of this.
Does anyone know a solution?

DDS

Code: Select all

4  1'&&F'
4 10'<<WEBVIEW>>'       
4 10HTML('Type: WebView 
    Border.Thickness: 1 
    AllowZoom : Y       
    Border.Color: Blue')
RPG

Code: Select all

LRNG_SetProperty('/Form.Fields.WEBVIEW.RESOURCE':'employee_128.png');
LRNG_SetProperty('/Form.Fields.WEBVIEW.URL': 'Sample.html');
Sample.html

Code: Select all

<body>
	<img src="employee_128.png">
</body>
Regards,
Taku Izumi

jasonzhou
Posts: 116
Joined: Tue Jan 10, 2017 11:26 pm

Re: [RPG] How to show a image in a html file

Post by jasonzhou » Thu Aug 08, 2019 6:19 pm

Can you please try out the following code:

Code: Select all

<body>
	<img src="/app/resources/employee_128.png">
</body>

Taku Izumi
Posts: 11
Joined: Tue Jul 09, 2013 9:23 pm

Re: [RPG] How to show a image in a html file

Post by Taku Izumi » Mon Aug 19, 2019 10:07 pm

Hi,

I changed the html code but still not show a image.

Next, I changed the html to the original source code and executed with the Windows, the image was shown.

Result_of_WinApp.png
Result_of_WinApp.png (13.23 KiB) Viewed 14 times

This code is Windows OK, iPhone NG.

Code: Select all

<body>
	<img src="employee_128.png">
</body>
This code is NG with both Windows and iPhone.

Code: Select all

<body>
	<img src="/app/resources/employee_128.png">
</body>
Best regards,
Taku

Post Reply