Autor | Zpráva | ||
---|---|---|---|
tomas3333 Profil |
#1 · Zasláno: 29. 9. 2008, 17:04:06
Zdravím, tento kod mi v opere vrati undefined. V subore, ktory otvaram je len echo "a". Neviete cim to?
function ajax_return(httpRequest) { if (httpRequest.readystate == 4) { if (httpRequest.status == 200) { var odpoved = httpRequest.responseText; } else { var odpoved = "Error Occured: "+httpRequest.status+" "+httpRequest.status.Text; } } document.getElementById('chat').innerHTML = odpoved; } function ajax(data) { var httpRequest; if (window.ActiveXObject) { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); } else { httpRequest = new XMLHttpRequest(); } httpRequest.open("POST", "includes/chat_load.php", true); httpRequest.onreadystatechange = function() {ajax_return(httpRequest);}; httpRequest.send(null); } /* -- */ function chat_reload() { ajax(); } function chat_send() { var input = document.chatform.chat_message; ajax(input.value); input.value = ""; } |
||
Kajman_ Profil * |
#2 · Zasláno: 29. 9. 2008, 17:28:22
Co tahkle?
function ajax_return(httpRequest) { if (httpRequest.readystate == 4) { if (httpRequest.status == 200) { var odpoved = httpRequest.responseText; } else { var odpoved = "Error Occured: "+httpRequest.status+" "+httpRequest.status.Text; } document.getElementById('chat').innerHTML = odpoved; } } |
||
tomas3333 Profil |
#3 · Zasláno: 29. 9. 2008, 23:14:30
uz som prisiel kde bola chyba, readystate ma byt readyState
Kajman_: to tvoje nefungovalo, ale dik za snahu |
||
Časová prodleva: 16 let
|
0