Ciao,
vi posto il codice di un file javascript, che mi dovrebbe permettere di visualizzare il contenuto di più padine html nello stesso div, a seconda del link su cui clicco.
Esegue tutto a meraviglia su firefox, ma se provo in explorer, nulla: non mi visualizza nulla, ma nemmeno na virgola di html, pagina vuota!
Poi, in "index.html", chiamo la funzione " onclick="javascript: void tab1();" " per ogni link, e via dicendo...codice:var req = null; function processReqChange() { if (req.readyState == 4) { var dobj = document.getElementById( 'divVisualizza' ); dobj.innerHTML = req.responseText; } } function loadUrl( tab ) { var url = window.location.toString(); url = url.replace( /index.html/, tab ); if(window.XMLHttpRequest) { try { req = new XMLHttpRequest(); } catch(e) { req = false; } } else if(window.ActiveXObject) { try { req = new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) { try { req = new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) { req = false; } } } if(req) { req.onreadystatechange = processReqChange; req.open('GET', url, true); req.send(''); } } function tab1() { loadUrl( 'tab1_content.html' ); } function tab2() { loadUrl( 'tab2_content.html' ); }
Potete aiutarmi?

Rispondi quotando

