[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-22 Thread bill
Alex McAuley wrote: I replied to you with an example. I wrote Bill You need to observe the form submit. $('the-id-of-the-form').observe('submit',function(event) { /// do the ajax that TJ said... Event.stop(event); // will stop it doing its default action!

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-22 Thread bill
Chris Sansom wrote: At 10:54 -0400 22/8/09, bill wrote: Putting it all together (apparently wrongly) I have: $('messageProcessForm').observe('submit',function(event) { new Ajax.Updater('showMessageDiv', mail/process_message.php, { parameters:

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-22 Thread bill
Chris Sansom wrote: At 11:21 -0400 22/8/09, bill wrote: now $('messageProcessForm').observe('submit',function(event) { new Ajax.Updater('showMessageDiv', mail/process_message.php, { parameters: $('showMessageDiv').down('form').serialize(true), onFailure:

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-22 Thread Alex McAuley
] Re: POSTing a form via AJAX Chris Sansom wrote: At 11:21 -0400 22/8/09, bill wrote: now $('messageProcessForm').observe('submit',function(event) { new Ajax.Updater('showMessageDiv', mail/process_message.php, { parameters: $('showMessageDiv').down('form').serialize(true

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-22 Thread bill
- Original Message - *From:* bill mailto:will...@techservsys.com *To:* prototype-scriptaculous@googlegroups.com mailto:prototype-scriptaculous@googlegroups.com *Sent:* Saturday, August 22, 2009 6:42 PM *Subject:* [Proto-Scripty] Re: POSTing a form via AJAX

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-20 Thread bill
T.J. Crowder wrote: Hi, 'Tis indeed very easy. Say you have a form wrapped in a div: div id='formwrapper'form /form/div You can post it like so and take the result (which is presumed to be an HTML snippet in this case) and use that to update the container: new

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-20 Thread Alex McAuley
: bill To: prototype-scriptaculous@googlegroups.com Sent: Thursday, August 20, 2009 4:14 PM Subject: [Proto-Scripty] Re: POSTing a form via AJAX T.J. Crowder wrote: Hi, 'Tis indeed very easy. Say you have a form wrapped in a div: div id='formwrapper'form /form/div You

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-20 Thread bill
bill wrote: T.J. Crowder wrote: Hi, 'Tis indeed very easy. Say you have a form wrapped in a div: div id='formwrapper'form /form/div You can post it like so and take the result (which is presumed to be an HTML snippet in this case) and use that to update the container:

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-18 Thread T.J. Crowder
Hi, 'Tis indeed very easy. Say you have a form wrapped in a div: div id='formwrapper'form /form/div You can post it like so and take the result (which is presumed to be an HTML snippet in this case) and use that to update the container: new Ajax.Updater('formwrapper',

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-18 Thread Walter Lee Davis
Don't forget the convenience wrapper Form.request, which hijacks the form's default settings and uses them to construct an Ajax request to the same endpoint using the same protocol. So that means: form id=myform action=myform.php method=post ... /form script ...