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:  $('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>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.
>>     
>
> Jumping in here as a non-expert, but I think the problem may be that 
> your 'Event.stop(event);' is in the wrong place and should be outside 
> the 'new Ajax.Updater(...)', either before or after, but not inside. 
> It's when it hits that line that it's looking for the extra }
>   
now

$('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!
}

the error changes to:
Error: missing ) after argument list
Source File: http://192.168.0.101/MP2010-v2/scripts/mail.js
Line: 36, Column: 1
Source Code:
}
 ^

As far as I can see the parens and brackets are balanced

-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to