These are excellent additions. I'm going to play around with this some more. Maybe
replace the common send() method with separate post() and get() methods. I believe
get() can be exactly the same as what load() does, for http get you don't have to
submit a form, but for post we definately need the submit that you added. Also
perhaps we should add our own data encoding scheme:
var data = new IOData();
data.add('value1',1);
data.add('array1', (1,2,3));
ioelm.post('url',data,fn);
I don't think the .getResult() method is necessary. I don't like the idea of being
restricted only one variable to recieve data from. Instead of generating a textarea
which contains the information, you can just generate a JavaScript variable and
retrieve it with e.getSource().getScope().variableName - maybe we should add a wrapper
like IOElement.getValue('variableName')?.
We could also distribute some prebuilt server scripts (PHP and ASP) for examples.
Like one for retreiving the contents of a URL (from another server) as a JavaScript
variable. We could also encapsulate an http post/get call into a server script, so
that you can post to another server, and recieve the results from that server as a
JavaScript variable also. This functionality would allow you to avoid the security
violation of obtaining data from a different server through JavaScript.
Regards,
Dan Steinman
On Wed, Jan 16, 2002 at 02:33:57PM -0800, Raymond Irving wrote:
> Hello Everyone,
>
> (I left off the zip file in the first post. Sorry!)
>
> I've added two methods (send and getResult) to
> IOElement. The send method allows you to send data
> using either the POST or GET method. It currently only
> works in IE & NS6. NS4 is giving me some problems
> with the <ilayer> (some help would be needed here).
>
> I would love for these two functions to make their way
> into the distributed ioelement.js file
>
> Syntax :
> send(url,data,callback,post)
>
> e.g.
> fn=funtion(e){alert(e.getSource().getResult())}
> ioe.send('myfile.asp','This is a test message to
> server',fn,'post')
>
> Any thoughts?
>
>
> P.S. I'm one step closer to adding RPC function calls
> :)
>
>
> --
> Raymond Irving
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[email protected]/