According to the docs of Request.HTML, you can only "update" an
element with the HTML returned by this AJAX call.  I needed to append
the HTML to an element rather than update, so I spent some time
casting around for another solution.  In desperation, I looked at the
Mootools source, and found this:

Request.HTML = new Class({

        Extends: Request,

        options: {
                update: false,
                append: false,
                evalScripts: true,
                filter: false
        },

<snip>

So I tried this:

                var myRequest = new Request.HTML({
                        url: [postURL],
                        append: 'targetDiv',
                        data: [myDataToPost],
                        method: 'post',
                        evalScripts: true
                }).send();

...and it worked.  Does this mean I can rely on this feature, or is
this going to be deprecated soon?

Thanks.

Reply via email to