Re: Newbie Question - variable name in getElementById() method doesn't seem to work
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Newbie Question - variable name in getElementById() method doesn't seem to work

From: <spivee@gmail.com>
Date: Mon Jan 30 2006 - 23:40:12 CET

Okay, I'm swift as a fork in the road.. Finally found the solution,
though it seems odd to me... I took the handleResponse(id) out of
doGetUrl() and changed the sendRequest() function as follows and it
works.

function sendRequest(url, id) {
    http.open('get', url);
    http.onreadystatechange = function() { handleResponse(id) }
    http.send(null);
}
Received on Tue Feb 7 21:28:02 2006