- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2014 01:21 PM
So here is what we are trying to do, we have built a new application that uses a processor because of js_includes conflicts when using UI pages. The app works great and it's nice because it doesn't come with all the includes and additional markup thats get jammed into a UI page.
So now, since js_includes and prototype is not available on the page... how do I make a GlideAjax call? Or can I mimic a GlideAjax call using jQuery Ajax?
I can already use the JSONv2 API to access all data client side, but being able to call Script Includes would be great.
Any thoughts or suggestions would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2015 07:17 PM
You can use jQuery.ajax, but you'll need the g_ck token to go along with it. Here's an quick example of how I run mine:
jQuery.ajax({
url: 'xmlhttp.do',
data: {
sysparm_processor: 'ScriptIncludeName',
sysparm_name: 'MethodName',
sys_id: 'ParameterValue',
table: 'ParameterValue'
},
headers: {
'X-UserToken': g_ck
},
success: function(response) {
console.log('received ' + response)
}
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2016 06:10 PM
They aren't required -- those are just a couple of parameters I'm reading in the ScriptIncludeName.MethodName method in my script include.