:: Forum >>

Reload DIV

hello experts,
if I try to reload a div like:

var req = new AW.HTTP.Request;
req.setURL('content.php');
req.setRequestMethod('POST');
req.response = function(text) {
d = document.getElementById("mydiv");
d.innerHTML = text;
};
req.request();

and content.php contains some widgets, they are not displayed.

Any ideas what`s wrong?
Thanks a lot!

Nino Garbin
Thursday, November 1, 2007
it seems that no javascript is executed in the content.php doing it this way.

I just want to reload only one div (mydiv) with content (content.php) containing widgets and other javascript stuff while submitting a form, not the whole page. Are there any other possibilities?

Thanks again!
Nino Garbin
Thursday, November 1, 2007
The scripts blocks are not executed if you insert them as innerHTML. You can try extracting them and executing separately with eval(), like the sample code in /examples/controls-tabs/code.htm
Alex (ActiveWidgets)
Friday, November 2, 2007

This topic is archived.


Back to support forum

Forum search