Sorry again for the off-topic post.  I'm trying to (finally) document and
make available some of the components I've built over the years.

This client-side (JavaScript) component makes managing multiple HTTP
requests simple.  Here's the (long) URL:

http://www.depressedpress.com/Content/Development/JavaScript/Extensions/DP_H
TTPRequestPool/Index.cfm

You can instantiate the object (the pool) with as many request objects as
you like and then create an interval to check for queued requests.  The
object has a very small footprint and multiple, completely independent pools
can be instantiated in the same application if need be.

Here's an example of instantiating the pool and kicking off the interval:

myRequestPool = new DP_HTTPRequestPool(4); 
myRequestPool.startInterval(100);

This will create four request objects and check for new requests every 100
milliseconds.

To add a request to that pool you call the "addRequest()" method:

myRequestPool.addRequest("GET", myURL, myParams, Handler, HandlerArg1,
HandlerArg2, HandlerArgN);

"GET" is the method, "myURL" is the (hopefully ColdFusion!) URL to call and
"myParams" is an object representing the parameters to pass to the URL.
"Handler" is a reference to the function to call with the results (the
results of the call will be passed as the first argument to the handler
function) and any other arguments will be passed, as is, to the handler as
additional arguments.

There's full documentation at the link and the component has been tested in
IE 6 and FireFox 1.5.  If you find any bugs or have any suggestions please
me know.

Jim Davis


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244829
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to