Archive for February 13th, 2007

Ajax objects

I’ve been writing a few ajax objects, but im pretty fed up of rewriting ajax stuff to suit specific onreadystate changes. The following object I’ve done basically pushes the ajax onreadystate process to a new object which you pass into the core ajax object. The source is here, take a look.

Simply put, the following is how it works.


function ReadyStateHandler1(){
this.parseparseAjax = function( __ajaxobject ) {
if ( __ajaxobject.readyState==4&&__ajaxobject.status==200){
//etc etc
}
}

var handler1 = new ReadyStateHandler1();
var ajax = new Ajax();
ajax.setCallingReference(handler1);
ajax.setUrl("/Some/Url");
ajax.process();

Anyway - it might be of some use in something you do.

Add comment February 13th, 2007


Calendar

February 2007
M T W T F S S
« Jan   Apr »
 1234
567891011
12131415161718
19202122232425
262728  

Posts by Month

Posts by Category


eXTReMe Tracker