Ciao a tutti. Ho un problema che mi stà facendo impazzire.
praticamente ho una pagina index.asp che contiene questo script per poter cambiare pagina web nel div (dx_centro)
codice:
<script language="Javascript" type="text/javascript">
function pageloader(url, target) {
document.getElementById(target).innerHTML = ' Fetching data...';
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
if (oXmlHttp == null) {
oXmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}
else {
oXmlHttp.abort();
}
}
catch (e) {
try {
oXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (oc) {
oXmlHttp = null;
}
}
}
if (req != undefined) {
req.onreadystatechange = function() {pageloaderDone(url, target);};
req.open("GET", url, true);
req.send("");
}
}
function pageloaderDone(url, target) {
if (req.readyState == 4) { // only if req is "loaded"
if (req.status == 200) { // only if "OK"
document.getElementById(target).innerHTML = req.responseText;
} else {
document.getElementById(target).innerHTML=" pageloader Error:\n"+ req.status + "\n" +req.statusText;
}
}
}
function load(name, div) {
document.getElementById('sx_centro').style.display = 'block';
pageloader(name,div);
return false;
}
</script>
Ora ho un form nella pagina azienda_add.asp che passa i dati alla pagina azienda_add-rec.asp e questo passaggio avviene nel div in questione.
Il problema è che se eseguo il tutto dalla pagina index.asp i valori non passano tramite request.form
Se invece uso direttamente azienda_add.asp i valori passano. Come posso farE?