Page 1 of 1

[RPG] The Data property of Web View

Posted: Thu Apr 26, 2018 4:28 pm
by Taku Izumi
Hi,

I am investigating to how to get the Latitude and Longitude of the url parameter from the Google map loaded in Web view.

I think that it may be to do it if use the Date property of Web View.

data_property.PNG
data_property.PNG (10.45 KiB) Viewed 3121 times

However, there is no more information about this.
Is there a sample for the Data property and ECL functions?

Regards,
Taku

Re: [RPG] The Data property of Web View

Posted: Fri Apr 27, 2018 4:18 pm
by jasonzhou
I'd like to know more details about this. Do you mean that you load an url in webview and want to send url parameters to RPG?

if yes, then you can send url parameters to RPG by using the following Javascript code:

Code: Select all

var DATA={};
DATA.Location.Lat = latitude;
DATA.Location.Long = longitude;
LONGRANGE.Form.setData(DATA);
in RPG code, you can get DATA by using the following code:

Code: Select all

Latitude = LRNG_GetPropasStr('/Form.Fields.WebView.Data.Location.Lat');
Longitude = LRNG_GetPropasStr('/Form.Fields.WebView.Data.Location.Long ');