> I disable Links on form edit like (excerpt)
> 
> Event.observe(document.body, "click",
noAction.bindAsEventListener(this));
> 
>       noAction: function(ev){
>               var el = Event.findElement(ev, "a");
>               if (!isUndefined(el.tagName) && el.tagName.toUpperCase()
==
> "A" &&
> Element.hasClassName(el, this.disabledClass))
>                       Event.stop(ev);
>       }

Hmm... that's an interesting approach.  Does that work on all browsers?
The case I was doing was attaching the event to the anchor element
itself, and Event.stop did not prevent the actual link from firing,
although that may have only been in certain browsers.  I can't remember
for sure; I just changed my design and moved on.

Greg
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to