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