Ciao a tutti!
ho un problemone con uno script che posto qui sotto:
<html>
<head>
<script type="text/javascript">
var page = "show_news.asp";
function ajax(url,target)
{
// native XMLHttpRequest object
document.getElementById(target).innerHTML = 'sending...';
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = function() {ajaxDone(target);};
req.open("GET", url+"?sid="+Math.random(), true);
req.send(null);
// IE/Windows ActiveX version
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.onreadystatechange = function() {ajaxDone(target);};
req.open("GET", url+"?sid="+Math.random(), true);
req.send();
}
}
setTimeout("ajax(page,'scriptoutput')", 10000);
}
function ajaxDone(target) {
// only if req is "loaded"
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200 || req.status == 304) {
results = req.responseText;
document.getElementById(target).innerHTML = results;
} else {
document.getElementById(target).innerHTML="ajax error:\n" +
req.statusText;
}
}
}
</script>
</head>
<body onload="ajax(page,'scriptoutput')" >
<DIV id="scriptoutput" >ciao</DIV>
</body>
</html>
Così come lo vedete voi funziona alla perfezione, ma appena inserisco un include tipo questo: ... Addio salta tutto e non vedo nulla solo il file compreso nell'include. perche??????![]()
Se qualcuno potrà aiutarmi gliene sarò grata per la vita![]()
Ciao e buon lavoro a tutti![]()

Rispondi quotando
spero serva a qualcuno 
ragazzi non ho risolto perchè non mi apre il link nel contenuto del div 
