sorry... solo oggi ho letto la risposta, ho provato le modifiche ma non funziona...
ho modificato il tutto in....
script:
PHP:codice:var req; function loadXMLDoc(key) { var url="prova.php?tipo="+key; getObject("tipo").innerHTML = ' Attedere Prego...'; try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(oc) { req = null; } } if (!req && typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); } if (req != null) { req.onreadystatechange = processChange; req.open("GET", url, true); req.send(null); } } function processChange() { if (req.readyState == 4 && req.status == 200) { getObject("form").innerHTML = req.responseText; document.res_request.state.focus(); } } function getObject(name) { var ns4 = (document.layers) ? true : false; var w3c = (document.getElementById) ? true : false; var ie4 = (document.all) ? true : false; if (ns4) return eval('document.' + name); if (w3c) return document.getElementById(name); if (ie4) return eval('document.all.' + name); return false; }
e riallego l'img dell'errore come si può notare i radio non vengono ripetuti ma mi appare sempre "attendere prego...." e il radio interessato non rimane selezionato....codice:<? if($_GET['tipo'] == "azienda"){ echo "Sono un'Azienda"; } if($_GET['tipo'] == "privato"){ echo "Sono un Privato"; } ?> <html> <head> <script type="text/javascript" src="load.js"></script> </head> <body> <form id="tipo"> <input type="radio" name="tipo" value="privato" onchange="loadXMLDoc(this.value);">Privato <input type="radio" name="tipo" value="azienda" onchange="loadXMLDoc(this.value);">Azienda </form> <div id="form"></div> </body> </html>
lo so che è una cosa banale ma è tra le prime funzioncine che scrivo in js.... vi ringrazio

Rispondi quotando