vegUI.org home of the javascript based window manager and AJAX framework

VegUISiteKit: AJAX Bridge

The vegUI AJAX framework taken from the original vegUI web-application foundation. Provides functions to send requests to the server and to handle the server response. Custom functions can be assigned to deal with each request response or a global function can be used if you want to design your own protocol. Also provides functions to handle time outs and request time.

Demonstration

Code: Javascript
/* 
 * Initialize Bridge and send a request to the server with parameters 
 *test=1 and method post. 
 */
var b = new VegUIBridge();

b.send('test.php','test=1','POST', function() { 
  alert(this.request.responseText+', request time:'+this.timeSend); 
});

/* Handle timeouts */

b.ontimeout = function() { alert('Request timed out'); };

b.onmaxtimeouts = function() { alert('Connection Lost'); this.denyRequests = true;};

Dependencies

none

Download

This package contains the code in both commented and compressed forms. The compressed version has had it's comments and unnecessary whitespace removed in order to reduce it's size.

download version
tar.gz (4,2 KB),
zip (6,8 KB)
1.0.2
tar.gz (4,2 KB),
zip (6,8 KB)
1.0.1
tar.gz (4,2 KB),
zip (6,8 KB)
1.0.0

Tutorials on using this library

Changelog

2007-11-22 vegu@vegui.org
        * version 1.0.2
        * fixed: IE6 should no longer crash on the cleanup() routine

2007-04-18 vegu@vegui.org
        * version 1.0.1
        * fixed: VUI_URL is now defined as it should be and it's default value is ''

2007-03-12 - vegu@vegui.org
        * version 1.0.0