I want to retrieve the value of a field of my screen to put in my url: http://ipadress?p='fieldvalue'.
What should I do?
Recover the value of a field
-
- New User
- Posts: 15
- Joined: Tue Sep 11, 2012 2:16 pm
- First Name: Djibril
- Last Name: SOW
- Company Name: union5
- Contact:
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: Recover the value of a field
Hello,
i think you wish to open a new browser tab with the url. We did that in the following way: A textbox on the screen contains the value for the url. In the onclick - event of a button we use that url to open a new browser window. In the onclick - event we coded the following: window.open(getElementValue("bs_maplink"));
The api "getElementValue" gets the value of our textbox. The parameter for "getElementValue" is not the RPG-name of the textbox but it is the "id" of the field. (The most top entry in the properties window).
I hope you can understand my bad English.
Dieter
i think you wish to open a new browser tab with the url. We did that in the following way: A textbox on the screen contains the value for the url. In the onclick - event of a button we use that url to open a new browser window. In the onclick - event we coded the following: window.open(getElementValue("bs_maplink"));
The api "getElementValue" gets the value of our textbox. The parameter for "getElementValue" is not the RPG-name of the textbox but it is the "id" of the field. (The most top entry in the properties window).
I hope you can understand my bad English.
Dieter
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: Recover the value of a field
An additional entry to my former reply: Maybe you want to change the value of an element. Then you can you the javascript api "changeElementValue". e.g. changeElementValue("txtRefresh", 'Hello World');
-
- Profound User
- Posts: 64
- Joined: Thu Aug 04, 2011 4:53 am
- First Name: Karl
- Last Name: Fritz
- Company Name: Logic IT Services
- Address 1: Fluhgasse 141
- City: Laufenburg
- Zip / Postal Code: 5080
- Country: Switzerland
- Location: Switzerland
- Contact:
Who is online
Users browsing this forum: No registered users and 1 guest