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! > > }); > > > Alex Mcauley > http://www.thevacancymarket.com > Putting it all together (apparently wrongly) I have:
$('messageProcessForm').observe('submit',function(event) { new Ajax.Updater('showMessageDiv', mail/process_message.php, { parameters: $('showMessageDiv').down('form').serialize(true), onFailure: function(response) { alert ("mail.js: failure to submit form - getmessage"); } Event.stop(event); // will stop it doing its default action! }); } When I try to load this I get the message: Error: missing } after property list Source File: http://192.168.0.101/MP2010-v2/scripts/mail.js Line: 33 Source Code: Event.stop(event); // will stop it doing its default action! but, I can't see a missing close bracket. -- Bill Drescher william {at} TechServSys {dot} com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---