Incidentally Elv, if you're still working on this project I'll add it to the "projects" section as "Shining Ajax" (unless you have another name for it
)| « previous next » |
| Pages: 1 [2] | ![]() |
January 09, 2007, 10:10:09 am
Posts: 837
Logged
Re: AJAX - A Viable Option?
)
January 11, 2007, 03:48:18 am 
Posts: 230
Logged
Re: AJAX - A Viable Option?
while(this.HasNothingToReturn){}
return SomethingToReturn;
while(this.HasNothingToReturn){
Sleep(1000); //sleep for 1 second
}
return SomethingToReturn;
AjaxSocket = function(serverPath){
this.Receiver = new Jax(serverPath);
this.Receiver.handler = this;
this.Sender.onComplete = function(msg){
this.handler.OnReceive(msg);
this.handler.Listen();
}
this.Sender.onHttpError = function(err){
this.handler.Listen();
}
this.Sender = new Jax(serverPath);
this.Listen();
}
AjaxSocket.prototype.Send = function(msg){
this.Sender.GETRequest(pathToServerSenderScript, false);
}
AjaxSocket.prototype.Listen = function(){
this.Sender.GETRequest(pathToServerReceiverScript, false);
}
AjaxSocket.prototype.OnReceive = function(msg){
//this event gets called when we receive something
}
May 08, 2007, 01:24:01 am 
Posts: 230
Logged
Re: AJAX - A Viable Option?
