On 12/14/05, Jason Hummel
<jhummel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I''m going crazy here. I''m trying to stop a link from
being followed
> after it''s clicked. It works everywhere except Safari (using v.
2.0.2
> on Tiger)
>
>
> I''m using behavior.js to attach events based on a class or an id:
>
> *******************************************************
> function loadData(e) {
> // load some data here based on the url of the a tag
> (removed for simplicity)
>
> // then stop the defaultevent
> if(e) {
> Event.stop(e);
> }
> return false;
> }
>
> var ajaxRules = {
> ''.ajaxLink'' : function(myAnchor) {
> // ... code to set up Ajax is up here (removed for
simplicity)
>
> // put an event handler.
> Event.stopObserving(myAnchor, ''click'',
loadData, false);
>
>
> }
> };
>
> Behaviour.register(ajaxRules);
> *******************************************************
>
> Any idea what I''m doing wrong?
>
> Thanks in advance.
Return false in the onclick event.
--
rick
http://techno-weenie.net