on 09-06-2006 8:28 AM
i have two inputfields (named input1 and input2)in one view.
i hope input2' value will be changed after i input a value into input1 and input1 lost focus .
<b>{e.g.:
i input a number '10' into input1 then input2 will got a vlues 20(formula:10*2=?).
}</b>
but u know i cann't find any InputField' lost focus event.how to do it?
Hi,
I doubt whether it's possible to do it the way you are trying. If you want to the second value to change as soon as the first inputfield looses focus, then it's not possible in WD. Since "loosing focus" is a pure client side event and has no corresponding server side event in WD.
But if you trying to do it on click of some button or something, then it's achievable. You can also think about calculated attributes.
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
winogal,
Actually, calculated attributes may created even in this case (in child 1..1 non-singleton sub-node).
However, they are of no use here. You need some action to force client-server roundtrip. Low-level client side events are not propagated to server.
So either use onEnter action handler for first input (users must press ENTER key to fire it), or create explicit button/link2action "Recalculate" or both.
Valery Silaev
EPAM Systems
If there is a server event which takes place,(my guess is yes, since input field 2 value changes), you can achieve this using:
1) Go to wdModifyView method
2) Request for input field element using
element = (myelementcast) view.getElement("elementname");
3) element.requestFocus();
Hope this helps.
Regards,
Subramanian V.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.