herbert-85NKovevlVINGJ1uqKmoEQ@public.gmane.org
2006-May-05 03:03 UTC
Sending a <form> as a SOAP request
Hi, I''m currently using the prototype.js script with the below code. function ajaxSubmitForm(form, url, id) { var params = Form.serialize($(form)); new Ajax.Updater(id, url, {asynchronous:true, parameters:params}); } my wish is that I want to use it as. function ajaxSubmitFormAsSoap(form, url, id) { ... } the idea is the same, the script must build a SOAP request based on the fields found in the "form" and send it as SOAP to "url" and then update "id" with the response. Kind Regards, Herbert -- Doe mee met de W2K6.nl pool. Gratis deelname, 4 MP3 spelers van 4 GB te winnen. http://w2k6.nl/?page=pool
Sure this is possible, but why? Ajax can only access the "current" server (the server the page was loaded from) so in most cases you probably have full control over the server and can just generate HTML on it, no complicated layering/SOAP/WS-* required. My advice for this is (if you aren''t forced by circumstances to have to use SOAP): - Use the Server for what it is good at: Generating HTML - Use the Browser for what it is good at: Displaying HTML Also note that XML stuff in JavaScript is painfully slow sometimes. If you really _have_ to use SOAP, you might be better off writing a SOAP -> HTML and vice versa converter on the server. -Thomas Am 05.05.2006 um 05:03 schrieb herbert-85NKovevlVINGJ1uqKmoEQ@public.gmane.org:> Hi, > > I''m currently using the prototype.js script with the below code. > > function ajaxSubmitForm(form, url, id) { > var params = Form.serialize($(form)); > new Ajax.Updater(id, url, {asynchronous:true, parameters:params}); > } > > my wish is that I want to use it as. > > function ajaxSubmitFormAsSoap(form, url, id) { > ... > } > > the idea is the same, the script must build a SOAP request based on > the fields found in the "form" and send it as SOAP to "url" and then > update "id" with the response. > > Kind Regards, Herbert > > -- > Doe mee met de W2K6.nl pool. > Gratis deelname, 4 MP3 spelers van 4 GB te winnen. > http://w2k6.nl/?page=pool > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs-- Thomas Fuchs wollzelle http://www.wollzelle.com http://www.fluxiom.com :: online digital asset management http://script.aculo.us :: Web 2.0 JavaScript http://mir.aculo.us :: Where no web developer has gone before