how to display alert message when filed value changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 04:26 AM
hi All
i am trying to display an alert message in incident form ,i have configuration item filed when user selects "redbird"option in configuration item filed .i have to pop up a alert message ..saying that "you have selected "redbird as your choice".can any one help ...?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 04:47 AM
var x = g_form.getValue('field_name')
if(x == true)
{
alert('you have selected redbird as your configuration item');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 05:24 AM
this gives alert when ever i select some value on the filed ,i want it when specific option is selected
for example :there are 3 options:A,B,C
if i select A then only i should get the alert message.if i select B or C i dont want alert message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 05:59 AM
Try this work for only *ASSET-IBM
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
var popup='*ASSET-IBM';
var ci=g_form.getDisplayBox('cmdb_ci').value;
if(ci==popup)
{
alert("Selected CI is= "+ ci);
}
}
Thanks
Pradeep D J
PS - Please mark Helpful, Like, or Correct Answer if applicable.