- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2016 06:52 AM
Soni,
Add alert in your call back function as shown below and let me know what you see.
Here is your onChange client script on Needed By variable:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
g_form.setDisplay('title', false); // put in the variable name you want to show or hide according needed by date
return;
}
var ga = new GlideAjax('ValidateNeededBy');
ga.addParam('sysparm_name','validateDate');
ga.addParam('sysparm_needed_by',newValue);
ga.getXML(callBack);
function callBack(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
if(parseInt(answer)>=27){
g_form.setDisplay('title', false); // put in the variable name you want to show or hide according needed by date
}
else{
g_form.setDisplay('title', true); // put in the variable name you want to show or hide according needed by date
}
}
}