Multiple fields with onChange
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2011 03:30 PM
I am using client scripts to set the incident state on my forms. This is working great however I do have one question.
One of my conditions is based off of if several fields change. I cannot use the modified function because there are some fields I do not want this to apply to. Is there a way you could apply onChange to multiple fields without making a separate client script?
If am example helps this is a single client script of mine...
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
//If the page isn't loading
if (!isLoading) {
//If the new value isn't blank
if(newValue != '') {
//Type appropriate comment here, and begin script below
var state;
state = g_form.getValue('incident_state');
//alert("state = " + state);
if(state == '210' || state == '220'){
g_form.setValue('incident_state', '230');
}
}
}
}
Thanks,
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2023 12:16 PM
DO NOT CLICK THIS BLOG LINK.
I am not sure how the people above me experienced any different, but I am currently dealing with multiple viruses that have popped up on my system after clicking this link.