Hello, I added a semi-multitasking feature to IOElement (it's not work very well) which can use very useful to some apps. The idea is to create more than one loader (or thread) so that two or more downloads can theoretically occur at the same time. This feature could be used in place of creating four separate IOElement objects.
example:
ioelm= new IOElement(4) // creates 4 loader threads
ioelm.get('iothread-slow.html','some data',fn)
ioelm.get('iothread-med.html','some data',fn)
ioelm.get('iothread-fast.html','some data',fn)
The above should load all three pages at virtually the
same time (similar to how frames work in a browser).
The multitasking feature needs some more work. So feel
to hack away at it.
I've also added the get(url,data,fn) method which
replaces the load() method, a post(url,data,fn) and a
getValue(variablename) method
The data argument can be either an object {} or a
string:
data={name:value} or data='some text here'
if data is a string the variable name ioData is used
when sending it to the server.
For the getValue() method if no variable name
specified the name ioData is used as default.
Any thoughts? Do you think these features are useful?
--
Raymond Irving
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
ioelement3.zip
Description: ioelement3.zip
