W3C home > Mailing lists > Public > www-forms@w3.org > July 2006

RE: Handle XForms Submit whith XmlHttpRequest

From: Kugelman, John <jkugelman@progeny.net>
Date: Thu, 6 Jul 2006 09:20:43 -0400
Message-ID: <9A0E40933DE3E548A1B8E32063CE4EE482B442@es3.progeny.net>
To: "Landry DEFO KUATE" <defolandry@yahoo.fr>, <www-forms@w3.org>
The replace="instance" option on <submission> will replace only the instance data for your form, leaving the page in place. It sounds like this is exactly what you want, since it's like a background AJAX transmission that doesn't reload the entire page.

 

Another AJAX-based XForms processor is FormFaces (www.formfaces.com <http://www.formfaces.com/> ). FormFaces implements the whole submission module in XForms with the XMLHttpRequest object. As a bonus, FormFaces is implemented entirely in JavaScript so it's very easy to add in your own JavaScript callback functions if you need to extend it in some way.

 

Almost every XForms processor should be able to handle the replace="instance" option without reloading the entire page. Don't over-think this! :-)

 

John

 

________________________________

From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On Behalf Of Landry DEFO KUATE
Sent: Thursday, July 06, 2006 6:04 AM
To: Fritz_Schenk@Countrywide.Com; www-forms@w3.org
Subject: RE: Handle XForms Submit whith XmlHttpRequest

 

I can't use Xforms because with Xforms, when you click a submit for example, the submission object will built the http request and send it to server. Next, the browser will handle server response and show it in the page (roundtrip). The matter with this is that I have more forms and other information on the page and I just want to refresh the appropriate area that contains the form that was submit.

 

I am thinking of using a listner on te submission and cancel the submission onsubmit event. 

Il place, I will user a <xforms:setvalue value="handlerequest(.)"/> that will call a generic JavaScript function. This function have to do the same responsibility the submission will do, but by usin an XmlHttpRequest object. Then, this function will refresh the div that contains Xforms form with return data.

 

I want to know if this solution is smart and realistic and if somebody have deal with this in the past.

 

Thank's

________________________________

De : Fritz_Schenk@Countrywide.Com [mailto:Fritz_Schenk@Countrywide.Com] 
Envoyé : mercredi 5 juillet 2006 18:33
À : defolandry@yahoo.fr
Objet : Re: Handle XForms Submit whith XmlHttpRequest

 


Why are you not using XFORMS for the interaction with the server? 
Or am  I missing something? 



"Landry DEFO KUATE" <defolandry@yahoo.fr> 
Sent by: www-forms-request@w3.org 

07/05/2006 05:51 AM 

To

www-forms@w3.org 

cc

 

Subject

Handle XForms Submit whith XmlHttpRequest

 

 

 




Hi, 
  
I'm building an Ajax application witch have many modules. 
  
One man in my team is building an API to pilot the user interface at de server side (PHP). 
  
The other developers have to write their Forms (XForms) an use the API to show forms to the client. 
  
The interaction between the client (browser) and the server  (PHP) is handle with XmlHttpRequest (or quivalent) in javascript. 
  
We are finding a way to handle all the onclick (onsubmit) event and pass the HTTP request to the XmlHttpRequest who will post then to the server a smart way. 
  
Can some one of you point me with a framework that do those kind of stuff? Or any idea? 
  
Cordialy, 
  
Landry. 
  
SP: applogies for my English, my mother language Is French. 

======================================================================
Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries.  If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law.  If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession.
======================================================================
Received on Thursday, 6 July 2006 13:22:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:05 GMT