Ajax objects

February 13th, 2007

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.

Entry Filed under: Technology

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

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

Most Recent Posts


eXTReMe Tracker