$("ida").observe("click", function(e) {
  e.stop(); // "Event.stop(e)" in ver <1.6
  do_something();
});

- kangax

On Apr 27, 3:16 pm, Domini <[EMAIL PROTECTED]> wrote:
> How can one achieve such a result with prototype.js?
> ####################
> <a id="ida" href="">abc</a>
> <script>
> $("ida").onclick=function()
> {
>  do_something();
>  return false;}
>
> </script>
> ####################
> The following code doesn't work exactly as the above one. I mean,
> return false doesn't have any effect and href is being followed
> anyway.
> ####################
> <a id="ida" href="">abc</a>
> <script>$("ida").observe("click",function(){do_something(); return
> false;});</script>
> ####################
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-spinoffs@googlegroups.com
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