Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> Firefox i AJAX
borp
post 8.06.2010, 07:44:37
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 8.06.2010

Ostrzeżenie: (10%)
X----


Mam problem z firefoxem
Poniższa funkcja działa wszędzie tylko nie w firefox
Obiekt "zalogowany_user" nie jest wypełniany zawartością, reszta działa poprawnie. Co należy zmienić żeby działało to pod firefox?

function pokaz_user(login, haslo) {

var xmlhttp;

if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
xmlhttp = false;
}
}
}

xmlhttp.open("POST", "pokaz_user.php", false);
xmlhttp.overrideMimeType('text/xml');
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send("login=" + login + "& haslo=" + haslo);

xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4) {
document.getElementById("zalogowany_user").innerHTML = xmlhttp.responseText;
}
}

}
Go to the top of the page
+Quote Post

Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 20.06.2025 - 03:19