Is there a way at jJavascript runtime to return the control that called the onchange event?
Is there a way at jJavascript runtime to return the control that called the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can choose for some custom JavaScript to run when the onchange event fires for each control. Open a form to customize it > select a control > click properties. There is an “Events” tab where you can specify JavaScript functions to run when the onchange event fires for the control. One of the options for this event is “Pass execution context as first parameter“. This means you could have a generic JavaScript function like so:
Therefore you could setup a control to call the function “control_onchange” and pass the execution context (which has useful information about the control) as the paramater.
See MSDN for the list of available actions with this context.
Some examples:
To get the field name:
To get the field value: