Login Register

Do we need to reparse widgets after xhrPost?

Hi,

I am calling xhrPost, which is returning me html code that I put in an innerHTML of some div.
Now, that html code contains dijit widgets. Now those widgets aren't displaying properly, and I guess it's because I have to parse them. Can I call a function to reparse the widgets automatically or do I have to parse each of them individually?

Thanks,

ltn2k

Dojo.parser.parse(domNode)

Dojo.parser.parse(domNode) or.... Use a contentpane instead of xhr calls since cpane will parse the widgets for you.
-Karl

Any other option than parse?

Hi,

Thanks for replying. Actually, using a contentPane isn't an option since I need to pass the form data.
I guess I could use dojo.query to get say all elements of x class and loop through them and parse them.
It seems a bit cumbersome to do that, but what other choice do I have? Anyone else?

Thanks,

ltn2k

Sorry I can use contentPane after all

I still the xhrPost, but for the onLoad I will use setContent instead of innerHTML.

It works.

Thanks,

ltn2k

I spoke too soon: Doesn't work in IE 7

Did anybody else experience problems with the ContentPane's setContent in IE 7?
Well...the problem seems that it doesn't execute the scripts and parse the widgets.

Thanks,