Page 1 of 1

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

Posted: Thu Aug 08, 2019 11:32 am
by Taku Izumi
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

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

Posted: Fri Aug 09, 2019 9:19 am
by jasonzhou
Can you please try out the following code:

Code: Select all

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

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

Posted: Tue Aug 20, 2019 1:07 pm
by Taku Izumi
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 42606 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

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

Posted: Mon Aug 26, 2019 10:39 am
by jasonzhou
Hi Taku,

I put your code in my demo program, it works ok on iPhone.

Attached is my demo, it's almost exactly same as your code. Can you please run it seeing if it works ok?

Thanks
Jason

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

Posted: Tue Sep 10, 2019 12:22 pm
by Taku Izumi
Hi Jason,

Thank you for your sample.
Your sample works OK in my iPhone.

So, I will check a difference between your sample and my one.

Best regards,
Taku