request and chain

42 views
Skip to first unread message

snillo

unread,
Nov 25, 2008, 9:34:14 AM11/25/08
to MooTools Users
Hello,

first of all sry for my bad english. I'm currently working on a chat
with Mootools and PHP. For this i have only 1 Request object which i
use to send and get messages from/to the PHP Script.. For each message
a chatter posts, i start the request with .send() . Now if the chatter
posts 2 messages very fast i need to chain up the request. This works
great in FF but doesn't in Opera and IE6. If there are 2 Requests (the
first one has not finished when the second one is startet) then in
Opera and in IE only the first Request is completed, the second one
starts the request ("onRequest") but does not finish it
("onComplete")! Has anyone an idea why?

I wrote a small testing code for the problem, you can find it here:
http://paste.mootools.net/f1dc17795

Btw is this the correct way to post code in this list?

greetings, Georg

electronbender

unread,
Nov 26, 2008, 9:37:13 AM11/26/08
to MooTools Users
You could gather them in an array, and if nothing is posted within 1-2
seconds, send the request.
Btw, have you tried onSucess?

snillo

unread,
Nov 27, 2008, 3:08:02 AM11/27/08
to MooTools Users
Thanks for youre answer. I was also thinking about gather them in an
array and send them periodically, should be working, but with a longer
delay... But why does the chaining of requests not work, is this a
known issue? I also tried the onSuccess event. I found this
http://www.mooforum.net/discussion/request-objects-destroy-themselves-t629.html
on mooforum, i think they are talking about the same problem but
without a solution.

nutron

unread,
Dec 1, 2008, 8:14:00 PM12/1/08
to mootool...@googlegroups.com

This post reminded me of a class I put together to manage multiple instances
of Request a while back. It wasn't very polished at the time so I spent a
bit of time cleaning it up and documenting it all.

You can see it in action here:

http://www.clientcide.com/wiki/cnet-libraries/06-request/02-request.queue

and you can read the docs here:

http://www.clientcide.com/docs/Request/Request.Queue

Download it here:

http://www.clientcide.com/js


-----
The MooTools Tutorial: http://www.mootorial.com www.mootorial.com
CNET Clientside: http://clientside.cnet.com clientside.cnet.com
--
View this message in context: http://n2.nabble.com/request-and-chain-tp1576562p1601765.html
Sent from the MooTools Users mailing list archive at Nabble.com.

Reply all
Reply to author
Forward
0 new messages