struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Park" <Henry.P...@isd.lacounty.gov>
Subject RE: OT, ajax form submission
Date Mon, 01 Oct 2007 17:25:47 GMT
Thank you Randy, that worked out great.
-Henry

-----Original Message-----
From: Randy Jonasz [mailto:rjonasz@gmail.com] 
Sent: Monday, October 01, 2007 9:40 AM
To: Struts Users Mailing List
Subject: Re: OT, ajax form submission

Hi Henry,

Just add the following:

postBody: Form.serialize(yourFormId),

to your request.

On 10/1/07, Henry Park <hspark182@hotmail.com> wrote:
      new Ajax.Request('Login!show.action',
         {
           method:'post',
           postBody: Form.serialize(yourFormId),
           onSuccess: function(transport){
             var response = transport.responseText || "no response
text";
             target_span.innerHTML = response;
           },
           onFailure: function(){ alert('Something went wrong...') }
         });

Cheers,

Randy

-- 
Oscar Developer
McMaster University
75 Frid Street, Hamilton, ON
905 525 9140 x27735

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message