What is function(transport) means ?

127 views
Skip to first unread message

Nakata Kokuyo

unread,
Jun 30, 2009, 4:33:21 AM6/30/09
to Prototype & script.aculo.us
Good day All,

I normally found prototype sample like following :-

[code]
onComplete : function(transport) {
console.log('done');
console.log
(transport);
}
[/code]

but i have no idea what is 'Transport' means in function(transport) ,
what are the other common parameters used in function ?

Thank you !

Richard Quadling

unread,
Jun 30, 2009, 6:08:40 AM6/30/09
to prototype-s...@googlegroups.com


2009/6/30 Nakata Kokuyo <alvin...@gmail.com>

Transport gives you access to the response part of the request that the onComplete relates to.

http://prototypejs.org/api/ajax/options

--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
I need a car : http://snipurl.com/l4pih
ZOPA : http://uk.zopa.com/member/RQuadling

david

unread,
Jun 30, 2009, 6:18:12 AM6/30/09
to Prototype & script.aculo.us
Hi Nakata,

when you send an AJAX request, you want to return something from the
server. This is what is TRANSPORT:It is the result of the request, it
could be JSON, text/HTML, XML ...

Have more detailled in http://prototypejs.org/api/ajax/request and the
complete AJAX API: http://prototypejs.org/api/ajax

--
david
Reply all
Reply to author
Forward
0 new messages