Page 1 of 1
onselect and presskey enter
Posted: Fri Aug 05, 2011 10:39 am
by kfritz
Pls can somebody help me to define an automatic enter key on "onselect" of a combo-box. The meaning is to create a automatic dropdown menu for functions like "update, delete..." But the user should enter the function code manually as well. Or is this idea impossible? Thanks. Karl
Re: onselect and presskey enter
Posted: Fri Aug 05, 2011 11:55 am
by Brian
You should be able to put pui.click(); in the onselect property to force control back to your program. I'm not sure I understand the second part.
Are you saying you want the user to type something in the combo box, then select Update, Delete, etc from the SAME combo box and retain what they typed?
Re: onselect and presskey enter
Posted: Fri Aug 05, 2011 12:40 pm
by kfritz
Thanks Brian
I found the solution with the "pui-click" and it works fine. What i want to do is, select with a combo-box the functions of the program, like a popup menu for each subfile record. Do you understand me better now?
Re: onselect and presskey enter
Posted: Fri Aug 05, 2011 1:20 pm
by Brian
Ok. Yes a drop down for choosing actions on a grid is very normal. Glad you worked it out.
Re: onselect and presskey enter
Posted: Mon Aug 08, 2011 9:52 am
by kfritz
one question again...
the combo box works fine now, but if i want enter manually a functioncode in this combo box field, the value will be ignored. This means, i type a "2" for update in the combo-box field and hit submit. This should fire the update screen, but nothing happens. A dropdown select is ok.
Definition: Selection with choices...
I do the same with a combo box in the update program and there run both kind of selection.
Definition: Database driven selection...
Re: onselect and presskey enter
Posted: Tue Aug 09, 2011 9:34 am
by Brian
Are you sure your RPG program is not receiving the "2" and you are just not monitoring for it?
Re: onselect and presskey enter
Posted: Tue Aug 09, 2011 10:23 am
by kfritz
Hi Brian
If I select the value by dropdown selection, the value will be submitted and fires a function - a manual input not.
Karl
Defs:
Identification:
Field Type: combo box
Value: SELEKT
Selection Choices:
Choices: select,update,copy,delete,view
Choice Values: 1,2,3,4,5
Events:
onchange: pui.click("btnSubmit")
onselect: pui.click("btnSubmit")
Re: onselect and presskey enter
Posted: Wed Aug 10, 2011 8:54 am
by Brian
Ok. I assume you are doing a readc in your program to find the record that was changed. When you debug the program, is READC finding the record you typed an option on?
Re: onselect and presskey enter
Posted: Wed Aug 10, 2011 11:58 am
by kfritz
Brian,
I have three possibilities:
1st: I call the native rpg-pgm (green screen) - record found
2nd: I call PUI and select with dropdown of the combo box - record found
3rd: I call PUI and select with a manual entry in the combo box - NOT found
If I check the values (Firebug) these are all the same, regardless of a dropdown or manual entry. If you don't believe it, I am glad to send you the sources by email.
Thanks,
Karl
Re: onselect and presskey enter
Posted: Wed Aug 10, 2011 5:45 pm
by Brian
I don't doubt you, I'm just going through a list of possibilities in my head. Perhaps sending me the source is the best option. You can send it to the support at profoundlogic dot com address.