onselect javascript help
Posted: Sat Aug 06, 2011 10:51 am
In database-driven auto-complete textboxes, i usually just use pui.click & process the selected item in rpg.
In the code I am presently working on , I would like to process the selection in JavaScript.
The help in the designer says that the selected item will be passed as a JSON object to my function. I suppose that it will look like this ?So, if I have a function like this what is the name of the JSON object that I should be putting in the onselect attribute of the textbox ? or am I way off the track here ?
Any help appreciated.
Thanks & regards
Tony C
In the code I am presently working on , I would like to process the selection in JavaScript.
The help in the designer says that the selected item will be passed as a JSON object to my function. I suppose that it will look like this ?
Code: Select all
{"fieldName1":"value1","fieldName2":"value2"}
Code: Select all
function processSelected(o){
alert(o.fieldName1)
}
Code: Select all
processSelected(?)
Any help appreciated.
Thanks & regards
Tony C