Hi,

I return HTML as text/html from an AJAX-call, that contains various
script and link rel=stylesheet elments:

<script type="text/javascript" src="../_javascript/drag-drop-folder-
tree.js"></script>
<div id="main">
...
</div>

I create a jQuery object from the result, whitch seams to work, but
when I try to select something I get the error:
ret[i].getElementsByTagName is not a function
jquery.js (line 1362)
r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));

My AJAX-callback looks like this.

function onAjaxRequestResult_main(result)
{
        var resultDom = $(result);

        var stylesheets = resultDom.find("link[rel=stylesheet]");
        var scripts = resultDom.find("script").get();
        var mainDiv = resultDom.find("div#main");


When there is no script or link element everthing works fine. If the
result contains only one script or link element everthing is fine too.
But when there is any content beside the single script/link element, I
get the error above.

-Erik

Reply via email to