02-26-2008, 02:12 PM
|
#3 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Location: On your Hard Drive, hiding like a Virus
Posts: 817
Thanks: 163
|
Quote:
Originally Posted by SOCK
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]
__________________
Wax on, Wax off
|
|
|
|