why alert is not displaying in catalog client script?

Gamarawaji
Giga Contributor

Hi ,

 

when i try to give alert in catalog client script, it is not displaying anything.

please refer the code,

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var request1 = g_form.getValue('request');

if(request1 =='Complete a job in IWS')
{
alert('Job should be only in Error state');
}
//Type appropriate comment here, and begin script below

}

 

Thank You.

16 REPLIES 16

Please check client script configuration. You need to use request field/variable so that client script should run on onchange of 'request'.
Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

applied the same

and no onload of the form , right?

Remove the below just to make sure it doesn't cause any conflict.

if (isLoading || newValue == '') {
return;
}
-Anurag

it is On change

Change the order of the script, I wonder if there is any other script that causes issue and it affects your script.

-Anurag