On 8/24/07, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> The page works perfectly in Safari 2 and Firefox 2, but stubbornly
> navigates to the target of the link when clicked in Safari 1.3.9.

My Event.stop() function (Prototype 1.4 based):

  stop: function(event) {
    if (event.preventDefault) {
      event.preventDefault();
      event.stopPropagation();
      if (isKHtml) {
        var element = Event.element(event);
        var oldhref = element.href;
        element.href = 'javascript:void 0';
        (function(){ element.href = oldhref; }).delay(1);
      }
    } else {
      event.returnValue = false;
      event.cancelBubble = true;
    }
  },

You will need to adapt it, obviously. .delay() is a setTimeout wrapper
and isKHtml is true for Safari.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to