View Single Post
Old 02-26-2008, 02:12 PM   #3 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by SOCK View Post
You've confused / swapped the 'open' and 'send' methods. You should be using
Code:
xmlHttp.open("GET", "a.php", true);
xmlHttp.onreadystatechange= responseAsx;
xmlHttp.send(void);
You're also not using the responseAsx callback function correctly; notice how I've altered the code to use the name of the callback, not act as if it were a function call.

Wikipedia.org :: XMLHttpRequest
Now I get
Code:
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 34)
msg is not defined
[Break on this error] msg.innerHTML = xmlHttp.responseText;
test.html (line 34)
msg is not defined
[Break on this error] msg.innerHTML = xmlHttp.responseText;
:(, AJAX is harder than php. :P

More and More errors:
Code:
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 34)
msg is not defined
[Break on this error] msg.innerHTML = xmlHttp.responseText;
test.html (line 34)
msg is not defined
[Break on this error] msg.innerHTML = xmlHttp.responseText;
test.html (line 34)
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: /test.html :: Asx :: line 29" data: no]
[Break on this error] undefined
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 34)
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 38)
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: /test.html :: Asx :: line 29" data: no]
[Break on this error] undefined
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: /test.html :: Asx :: line 29" data: no]
[Break on this error] undefined
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 34)
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 38)
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: /test.html :: Asx :: line 29" data: no]
[Break on this error] undefined
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: /test.html :: Asx :: line 29" data: no]
[Break on this error] undefined
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: /test.html :: Asx :: line 29" data: no]
[Break on this error] undefined
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 34)
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 38)
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: /test.html :: Asx :: line 29" data: no]
[Break on this error] undefined
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: /test.html :: Asx :: line 29" data: no]
[Break on this error] undefined
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 34)
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead.
[Break on this error] undefined
test.html (line 38)
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: /test.html :: Asx :: line 29" data: no]
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote