> I have a page, were I use a Mootools Request object to send an html
> get request to the server, and then, it loads the content returned in
> the response into a div (evaluating the inline scripts returned into
> the html code).

Please  put  up  a  fuller  sample  at jsfiddle.net so we can see what
you're doing more clearly.

I  can  tell  you  that this Fiddle roughly corresponds to what you're
describing, yet the embedded event binding works in FF 4:

    http://jsfiddle.net/jSJgx/

> This is an snippet of the js code embebed into the html response:

> window.addEvent('domready',function() {
>         $$('#a_link_with_this_id').addEvent('click',function(event) {
>                 event.stop();

>               /* ... some code here ...*/
>         });
> });

No reason to redundantly detect domready in the embedded script if the
DOM is guaranteed ready when you fire the Request (i.e. the Request is
already dependent on domready).

It  is  better  yet  to  use event delegation so you don't have to add
events  via  script  evaluation,  but  rather  add  them  to  a parent
(container) element that does not change.

    http://jsfiddle.net/jSJgx/1/

-- Sandy

Reply via email to