On 9/12/06, Mariano Viola <[EMAIL PROTECTED]> wrote: > > Hi, > > I've a small problem with MochiKit.Signal, I'm using the revison 1115 > from SVN. > > I've search in the group for a similar probelm and I've find this: > http://groups.google.it/group/mochikit/browse_thread/thread/ff371bae19369098/eee583b0c09348c9?lnk=gst&q=%22src+has+no+properties%22+connect&rnum=1#eee583b0c09348c9 > But I don't have resolved the problem. > > This is the piece of code that don't work: > connect('red', 'onclick', swapImg); > the "src has no properties" is the error but when I try to use: > connect('window, 'onload', swapImg); > it work fine.
At the time you're executing that script, red doesn't exist. That's why it doesn't work. You either need to put the script tag sometime after red in the markup, or you need to execute that code in onload (either via connect or addLoadEvent but not both). -bob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" 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/mochikit -~----------~----~----~----~------~----~------~--~---
