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: DJ Majestik <jimmymg@gmail.com>
Date: Mon Jan 30 2006 - 22:31:11 CET

Where do you call your second method from (handleResponse)? If you do
it before the page is loaded, the div hasn't been created yet and
therefore, is not there to change the innerHTML. Try putting the
handleResponse in the body onload event:

<body onload="handleResponse('myTest');">

That should work if the first one works.
Received on Tue Feb 7 21:27:56 2006