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 05:30 AM
thanq so much for the reply ,i want an alert message to be displayed when a specific option is selected not for all message.
requirement is:
i want alert message when specfic 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 04:44 AM
Hi Govardhan,
You can write a simple client script for this.
var x = g_form.getValue('cmdb_ci', 'redbird')
if(x == true)
{
alert('you have selected redbird as your configuration item');
}
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 05:27 AM
thanq ,this code is not working i have tried it in on change client script can you let where i am doing wrong
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
var x = g_form.getValue('cmdb_ci', '*ASSET-IBM');
if(x == true)
{
alert('you have selected redbird as your configuration item');
}
}
requirement is:
i want alert message when specfic 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 06:05 AM
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
var ci=g_form.getDisplayBox('cmdb_ci').value;
if (ci == "redbird")
{
alert("Selected CI is= "+ci);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 04:46 AM