If you put an example in jsfiddle.net (html, js, css), we'll be able to help 
more.



On 2010-09-19, at 12:39, gasmor wrote:

> hi all,
> 
> why this code don't function ?
> 
> var MooEditor = new Class({
> 
>        initialize: function(id) {
>              this.toolbar  = $('for_toolbar');
>              this.path     = 'http://mypath';
>              this.load_toolbar();
>        },
> 
>       load_toolbar: function() {
>                       new Element('img', {"src": this.path + "image.gif",
>                                                          'class':'editor',
>                                                          'events': {
>                                                                               
> 'click': function(){ this.Paste() }
>                                                          }
>                                                          
> }).inject(this.toolbar);
>       },
> 
>      Paste: function() {
>           alert('paste')
>      }
> 
> 
> });
> 
> 
> 
> var myEdit = new MooEditor('oContent');

Reply via email to