Sebastian Dusza
Sebastian Dusza

Reputation: 2528

Loading content from ajax request into dom node in DOJO

I'm wondering is there a quick way in DOJO to load ouput of http request into some DOM node like in jQuery

$('#injectMe').load('/someResource', {
    id: 223,
    xxx: "2323"
});

ps I know about dojo.xhr* methods :) Maybe there is a simpler method ?

Upvotes: 1

Views: 275

Answers (1)

Craig Swing
Craig Swing

Reputation: 8162

You can use a ContentPane with a url to specify the content.

<div id="foo" data-dojo-type="dijit/layout/ContentPane" href="/some/page.html">
</div>

http://dojotoolkit.org/reference-guide/1.8/dijit/layout/ContentPane.html

Upvotes: 3

Related Questions