Page 1 of 1

Javascript on selecting from a dropdown list

Posted: Sat Nov 03, 2018 6:58 pm
by claude vidal
What is the trigger for a selection from a dropdown list?

I'm trying to set values other fields on that form based on what was selected from a given dropdown list.

I've assigned a Javascript to that dropdown field on every trigger available (Mouse: down, up, enter, leave, focus, blur); Javascript console active. Nothing triggers.

What do I need to do?

Re: Javascript on selecting from a dropdown list

Posted: Mon Nov 05, 2018 10:39 am
by Tracker Supp-Stefan
Hello Claude Vidal,

You will need to put the JS in "Keystroke Action":
Keystroke.png
Keystroke.png (13.63 KiB) Viewed 378 times
And the code I am using in one of my salmes looks something like:

Code: Select all

if (event.willCommit) 	
{
this.getField("SomeOtherFieldName").value = event.value + "your custom value";
}