OK, I really tried hard before I posted the above message, but sitting
on the toilet I found the mistake.
The code must look like that, than it works:
var Songlist = {
initialize: function() {
img = document.createElement('img');
[...]
img.observe('mouseover', Songlist.mouseover);
$('body').insert(img);
}
mouseover: function() {
this.src = 'anotherimage.gif';
}
}
Songlist.initialize();
On 18 Mai, 13:25, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I habe a problem with the following code (shortened):
>
> var Songlist = {
> initialize: function() {
> img = document.createElement('img');
> [...]
> img.observe('mouseover', this.mouseover);
> $('body').insert(img);
> }
> mouseover: function() {
> this.src = 'anotherimage.gif';
> }
>
> }
>
> Songlist.initialize();
>
> Passing the image with my mouse I always get the error: "handler has
> no properties"!
> I would be happy if you gave me a tip, where what causes this error!
>
> M. Hoffmann
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---