ConnectionManager

This page details the ConnectionManager endpoints and the actions they support. It covers key functions, parameters, and sample code for easy implementation.

  • URL: /jw/js/json/util.js
  • Auto included in all userview pages.
  • Convenient method to do AJAX call.

 

ajaxJsonp(url, callback, params)

Initiates Ajax call with JSONP.

  • Parameters:
    • url - URL to initiate Ajax call
    • callback - a callback function after a successful call (optional)
    • params - parameters for the call (optional)
  • Sample code:
var callback = {
    success : function(response){
        //do something
    }
};
ConnectionManager.ajaxJsonp('http://localhost/test', callback, 'id=4&name=test');

 

get(url, callback, params, xss)

Initiates Ajax GET to a specific URL.

  • Parameters: 
    • url - URL for GET action
    • callback - a callback function after a successful call (optional)
    • params - parameters for the call (optional)
    • xss - use when the URL is cross-domain (optional)
  • Sample code:
var callback = {
    success : function(response){
        //do something
    }
};
ConnectionManager.get('http://localhost/test', callback, 'id=6&name=test', false);

 

post(url, callback, params)

Initiates Ajax POST to a specific URL.

  • Parameters:
    • url - URL for GET action
    • callback - a callback function after a successful call (optional)
    • params - parameters for the call (optional)
  • Sample code:
var callback = {
    success : function(response){
        //do something
    }
};
ConnectionManager.post('http://localhost/test', callback, 'id=6&name=test');

 

Created by Damian Last modified by Aadrian on Dec 13, 2024