So the crazy thing is .... if i remove it from the Event.observe(window .... 
wrapper it seems to work and if i functionise it and place the function 
outside the wrapper and add onsubmit="return theFunction();" to the form it 
works ....

Not really to sure whats going on here but i would like to avoid inline JS 
if i can - if it cant be done then i will haveto use inline


Alex


----- Original Message ----- 
From: "Alex Mcauley" <webmas...@thecarmarketplace.com>
To: <prototype-scriptaculous@googlegroups.com>
Sent: Wednesday, March 18, 2009 3:45 PM
Subject: [Proto-Scripty] Re: Stopping events ..


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