I should add............

the bottom Event.stop(event); after the ajax request is not an option as i 
dont want it stopped there incase somethign went wrong in the request - i 
would like the click to follow the href and work as normal.

Alex Mcauley
http://www.thevacancymarket.com
----- Original Message ----- 
From: "Jeztah" <[email protected]>
To: "Prototype & script.aculo.us" <[email protected]>
Sent: Wednesday, July 29, 2009 12:08 PM
Subject: [Proto-Scripty] Event.stop(event);


>
> Morning guys/gals.
>
> I have some weird behaviour regarding Event.stop();
>
> $$('.quickdetails').invoke('observe','click',function(event) {
>
>
> var this_href=$(this).readAttribute('href');
> var element=this;
> var arr=this_href.split("/");
> if(arr.length<3) { return; }
> var vacancy_id=arr[arr.length-1];
>
> window.eEvent=event;
>
> var request=new Ajax.Request('/VacancyInfo',{
> evalScripts: true,
> method: 'get',
> parameters:
> {
> id:vacancy_id
> },
> onSuccess : function(transport) {
>
>
> var text=transport.responseText;
>
> $modals.showVacancy({string:text,node:element});
>
> Event.stop(window.eEvent); // doesnt stop it
>                                Event.stop(event); // doesnt also stop
> the event
> },
> onError : function() {
> return true;
> }
> });
> request=null;
> //Event.stop(event); // stops it
> });
> });
>
> ............
>
> Would it be better to set a variable in the "onSuccess" and then query
> the variable after the Ajax.Request ? as calling Event.stop() inside
> the handler does not seem to work on any browser ?
>
> Regards
> Alex
>
> >
> 


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to