How to use J2O.
J2O is formed by a superclass named J2O (what a fantasy!!!). J2O class has got these methods:
these variables
and these sub classes
- engine
- rankbar
- starfront
- starback
- maxtars
- init
- getRank
- createRB
- progressnar
- show_value
- max_length
- height
- imgfront
- imgback
- init
- createPB
- add
- subtract
addEvent (element, type, expression)
- element - is the element that have to catch the event
- type - the event to catch (ex. load, resize, ecc...)
- expression - the method to execute on event catch
This method add an event listenere in all modern browsers.
setStyle (id, text)
- id - the id of the element to be styled
- text - the text of the css style (ex. "width: 100px; height: 20px")
This method set the style of an element
makeRequest(url, handler, mode, params, async)
- url - the url to request
- handler - the function that have to handle the request
- mode - GET or POST
- params - parameters for the request
- async - true or false if the request must be asynchronous or synchronous
the makeRequest function is the most important function of J2O Library. this function work on jXHR variable (that contain the XMLHttpRequest object.
jXHR
jXHR contain the XMLHttpRequest object. This variable can be used by other js codes to work with it.