how to call client script into server side using script includes-------plse code plse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2017 08:14 AM
Plse provide code ....servide side & client side script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2017 08:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2017 05:00 AM
except wiki examples , can u please provide another one of example Ples,
i mean any one of best example plse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2017 01:38 PM
//Script Include (server)
var popGroup =Class.create();
popGroup.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
helloWorld: function () {
var rec = new
GlideRecord('sys_user_grmember');
rec.addQuery('user',
this.getParameter('sysparm_user_name'));
rec.query();
if(rec.next()) {
return
rec.group.toString(); //This will pass the sys_id of the group as a string
}
},
type: 'popGroup'
});
//Client Script (client)
function
onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//This calls the Script Include 'popGroup'
var ga = new GlideAjax('popGroup');
ga.addParam('sysparm_name','helloWorld');
ga.addParam('sysparm_user_name',g_form.getValue('name'));
ga.getXML(HelloWorldParse);
function HelloWorldParse(response)
{
var answer =
response.responseXML.documentElement.getAttribute("answer");
g_form.setValue('group',
answer);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2017 04:59 AM
except wiki examples , can u please provide another one of example Ples