Try calling Event.stop() at the very beginning of the script, before  
anything else, then if there are no errors, call event.form.submit()  
to carry on with the original submit event.

Walter

On Mar 18, 2009, at 11:45 AM, Alex Mcauley wrote:

>
> It still does not work with "Event.stop(event);" for some reason ....
>
>
> i even tried changing the code to .....
>
> var error='';
> $$('.req').each(function(e) {
>
>   if($(e).value=='') {
>    error+='Required';
>
> }
>
> });
> if(error.length>=1) {
>  alert(error)
>  Event.stop(event); // does not work
>
> }
>
>
>
>
> ----- Original Message -----
> From: "Alex Mcauley" <webmas...@thecarmarketplace.com>
> To: <prototype-scriptaculous@googlegroups.com>
> Sent: Wednesday, March 18, 2009 3:42 PM
> Subject: [Proto-Scripty] Re: Stopping events ..
>
>
>>
>> Doh !!!!!! i knew it was something simple !!
>>
>> Thanks
>> Alex
>> ----- Original Message -----
>> From: "Walter Lee Davis" <wa...@wdstudio.com>
>> To: <prototype-scriptaculous@googlegroups.com>
>> Sent: Wednesday, March 18, 2009 3:11 PM
>> Subject: [Proto-Scripty] Re: Stopping events ..
>>
>>
>>>
>>> Has to be capital E event:
>>>
>>> Event.stop(event)
>>>
>>> Walter
>>>
>>> On Mar 18, 2009, at 10:40 AM, Jeztah wrote:
>>>
>>>> event.stop(event); // doesnt stop the request from firing
>>>
>>>
>>>>
>>>
>>
>>
>>>
>>
>
>
> >


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