on 04-05-2018 2:59 PM
Hi script experts,
I have several customer buttons on my screen. I want to bind the same script to all my buttons and inside this script, i will check the Id of the input field which has been pushed and do something according to the button.
How can i get the ID?
Regards,
Alexandre
Answer :
alert(source.id)
Why this element doesn't show when we do Ctr+space? This editor is quite disturbing...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe my english is not perfect that's why you didn't understand 🙂
What i was trying to achieve :
Button 1 => script "JUMP_TCODE"
Button 2 => script "JUMP_TCODE"
Button 3 => script "JUMP_TCODE"
Script "JUMP_TCODE"
var button1 = session.findById("wnd[0]/usr/txtPersonas_152112903982052");
var button2 = session.findById("wnd[0]/usr/txtPersonas_152112903982053");
var button3 = session.findById("wnd[0]/usr/txtPersonas_152112903982054");
switch (source.id) {
case button1.id:
.....
break;
case button2.id:
.....
break;
case button3.id:
.....
break;
}
"source.id" was the command i was looking for. And i was pointing out the fact that the command "source" was not available with Ctr+space.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.