In other words, change:

.observe('click', deleteThis());

To:

.observe('click', deleteThis);

You're passing deleteThis() as the value of your callback, which isn't  
a function, but the return value of calling it.

-Fred

On Jul 1, 2008, at 2:09 PM, Matt Foster wrote:

>
> Looking at this brief snippet I see one potential error,  You're
> executing your callback, try sending just the reference.
>
>
>
>
> On Jul 1, 11:21 am, elduderino <[EMAIL PROTECTED]> wrote:
>>
>>>> var newCopy = new Element('div', { 'id' : obj.id, 'class' :
>>>> 'de_small' }).update(obj.innerHTML).observe('click', deleteThis());

--~--~---------~--~----~------------~-------~--~----~
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