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] | ![]() |
Posts: 837
LoggedPosts: 230
Loggedwhile(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
}
Posts: 230
Logged