|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Dec 2000
Messaggi: 501
|
[AJAX] Problema con IE6
Devo implementare una pagina web con delle SELECT dinamiche, la classica procedura di selezione della NAZIONE, poi della REGIONE ecc...
Su FireFox nessun problema ma su IE6 non va, la chiamata alla funzione sembra non avvenire affatto, quindi dopo aver selezionato la NAZIONE, non compare la SELECT per le REGIONI. Incollo qui il codice ![]() Codice PHP:
|
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Nov 2003
Messaggi: 980
|
Codice PHP:
Ultima modifica di kk3z : 28-01-2008 alle 10:42. |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Dec 2000
Messaggi: 501
|
mmm... cosi non funziona per niente...
![]() ![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Iscritto dal: Nov 2003
Messaggi: 980
|
nessun errore javascript?
|
![]() |
![]() |
![]() |
#5 |
Senior Member
Iscritto dal: Oct 2005
Messaggi: 3306
|
Sicuro di avere gli ActiveX abilitati su IE?
|
![]() |
![]() |
![]() |
#6 |
Senior Member
Iscritto dal: Dec 2000
Messaggi: 501
|
ho controllato, sono abilitati...
|
![]() |
![]() |
![]() |
#7 |
Member
Iscritto dal: Jan 2008
Città: roma
Messaggi: 296
|
ciao , questo e un pezzettino di codice che io uso nelle mie applicazioni , magari questo funziona ( se no ti posto il file x intero )
![]() Codice:
function Ajax (action , queryString){ this.getXMLInstance = function() { var XHR = null, browserUtente = navigator.userAgent.toUpperCase(); if(typeof(XMLHttpRequest) === "function" || typeof(XMLHttpRequest) === "object"){ XHR = new XMLHttpRequest(); }else if(window.ActiveXObject && browserUtente.indexOf("MSIE 4") < 0) { if(browserUtente.indexOf("MSIE 5") < 0) XHR = new ActiveXObject("Msxml2.XMLHTTP"); else XHR = new ActiveXObject("Microsoft.XMLHTTP"); } return XHR; } this.synchronizedMessage = function (){ var URL = action; var ajax = this.getXMLInstance(); var _response = ""; ajax.open(POST , URL , false); ajax.setRequestHeader(CONTENT_TYPE , APP); ajax.send(queryString); if(statusText[ajax.status] == "OK"){ _response = ajax.responseText; }else{ // alert("Error : " + statusText[ajax.status]); } return _response; } var CONTENT_TYPE = "Content-type"; var APP = "application/x-www-form-urlencoded"; var CONTENT_LENGTH = "Content-length"; var CONNECTION = "Connection"; var CLOSE = "Close"; var POST = "POST"; var readyState = { INATTIVO: 0, INIZIALIZZATO: 1, RICHIESTA: 2, RISPOSTA: 3, COMPLETATO: 4 }; var statusText = new Array(); statusText[100] = "Continue"; statusText[101] = "Switching Protocols"; statusText[200] = "OK"; statusText[201] = "Created"; statusText[202] = "Accepted"; statusText[203] = "Non-Authoritative Information"; statusText[204] = "No Content"; statusText[205] = "Reset Content"; statusText[206] = "Partial Content"; statusText[300] = "Multiple Choices"; statusText[301] = "Moved Permanently"; statusText[302] = "Found"; statusText[303] = "See Other"; statusText[304] = "Not Modified"; statusText[305] = "Use Proxy"; statusText[306] = "(unused, but reserved)"; statusText[307] = "Temporary Redirect"; statusText[400] = "Bad Request"; statusText[401] = "Unauthorized"; statusText[402] = "Payment Required"; statusText[403] = "Forbidden"; statusText[404] = "Risorsa Non Trovata"; statusText[405] = "Method Not Allowed"; statusText[406] = "Not Acceptable"; statusText[407] = "Proxy Authentication Required"; statusText[408] = "Request Timeout"; statusText[409] = "Conflict"; statusText[410] = "Gone"; statusText[411] = "Length Required"; statusText[412] = "Precondition Failed"; statusText[413] = "Request Entity Too Large"; statusText[414] = "Request-URI Too Long"; statusText[415] = "Unsupported Media Type"; statusText[416] = "Requested Range Not Satisfiable"; statusText[417] = "Expectation Failed"; statusText[500] = "Internal Server Error"; statusText[501] = "Not Implemented"; statusText[502] = "Bad Gateway"; statusText[503] = "Service Unavailable"; statusText[504] = "Gateway Timeout"; statusText[505] = "HTTP Version Not Supported"; statusText[509] = "Bandwidth Limit Exceeded"; } poi nella tua funzione dovresti utilizzarlo + o - cosi Codice:
function provincia(select) { var provincia = select.options[ select.selectedIndex ].value; var ajax = new Ajax("provincia.php" , "regione="+escape(provincia)); var e = document.getElementById("provincia"); e.innerHTML = ajax.synchronizedMessage(); } } |
![]() |
![]() |
![]() |
#8 |
Senior Member
Iscritto dal: Dec 2000
Messaggi: 501
|
ho cercato ancora in rete, ma non trovo alcun aiuto...
Riporto qui sotto tutto il codice che uso, mi sembra corretto, ma ancora non riesco a capire perchè non funziona in IE6... Codice PHP:
|
![]() |
![]() |
![]() |
#9 |
Senior Member
Iscritto dal: Feb 2003
Città: Formia
Messaggi: 1545
|
__________________
Il portale delle infomazioni di Latina e Provincia Giralatina.it e’ nato con il preciso intento di promuovere varie attività che si svolgono nella provincia di Latina http://www.giralatina.it Il Blog dei Pendolari http://www.giralatina.it/blog/mybloggie/index.php |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 17:00.