Connection Manager  1.6.0

BLOBkit Javascript Library > connection > TVB.Connection
Search:
 
Filters

Class TVB.Connection

TVBLOB custom event class

Constructor

TVB.Connection ( )

Methods

request

void request ( oMethod , oUrl , oParams , oTimeout )
Start a new XHR async connection
Parameters:
oMethod <String> "POST" or "GET"
oUrl <String> URI to be called
oParams <Object> JSON object to be passed to the POST call
oTimeout <Number> Milliseconds for the timeout (default 8000ms)
Returns: void

syncRequest

String syncRequest ( method , uri , params )
Perform a sync request and returns the content
Parameters:
method <Object> 'POST' or 'GET'
uri <Object>
params <Object>
Returns: String
The message returned, false if connection failed

xmlhttp

Object xmlhttp ( )
Create a new http asyncronous request
Returns: Object
xmlHttp object

Events

TVB.Connection.events.failureevent

TVB.Connection.events.failureevent ( )
Fires when a failure happens

TVB.Connection.events.loadingstart

TVB.Connection.events.loadingstart ( )
Fires when the loading starts

TVB.Connection.events.loadingstop

TVB.Connection.events.loadingstop ( )
Fires when the loading stops

TVB.Connection.events.timeoutevent

TVB.Connection.events.timeoutevent ( )
Fires when a timeout happens

Configuration Attributes

callback - object

Set this property to the callback to be called after a successfull XHR connection


Copyright © 2010 TVBLOB S.r.l. All rights reserved. The BLOBkit library is a resource ofBLOBforge.