Dynamically reload page and execute javascript
Hi all,
I have problem wit refreshing page. I send to server request using ajax this way
- function nactiW4AuditSParametry(parametry, zadanaUrl) {
var parametryUrlString = vytvorParametry(parametry);
$.ajax({
url: "W4Audit.do",
data: parametryUrlString,
success: handleResponseW4Audit
});
}
In a callback function I want to reload whole page from which this request was called and also execute javacsript that is on this page.Defining callback function this way
- function handleResponseW4Audit(data) {
if (data == "_sessionTimeout_") {
document.location.href = "Login.do";
} else {
$("html").html(data);
}
}
causes that only plain html is loaded and no javascript is executed. Any ideas how to force browser to execute also javascript?
Thanks for answers