Page 1 of 1
Recover the value of a field
Posted: Tue Sep 11, 2012 2:29 pm
by kaw
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?
Re: Recover the value of a field
Posted: Wed Sep 12, 2012 4:17 am
by dieter
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
Re: Recover the value of a field
Posted: Wed Sep 12, 2012 4:32 am
by dieter
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');
Re: Recover the value of a field
Posted: Wed Sep 12, 2012 8:57 am
by kfritz
Try this:
pui.openURL("
http://ipadress?p="+get("myFieldID"));
Hope this helps.