[thelist] document.getElementById has no properties

Christian Heilmann codepo8 at gmail.com
Tue Sep 20 05:36:44 CDT 2005


The element is only available after the page has loaded and the dom
was parsed. Therefore you need to wrap your call in a function that
gets executed when the page has loaded.
<script type="text/javascript">
window.onload=function(){
document.getElementById("bottomback").appendChild(top.bottombar[1][<?=$Language_Id?>]);
}
</script>

More: http://www.onlinetools.org/articles/unobtrusivejavascript/chapter4.html 

And, no, your internal IP is not available to us. 

On 9/20/05, Vinayakam Murugan <mvinayakam at gmail.com> wrote:
> Hi
> 
> I am trying to append a preloaded image to a tag. It is giving me the
> following error
> 
> Error: document.getElementById("bottomback") has no properties
> Source File:
> http://192.168.100.11/app_dir/layout/preload.php?Language_Id=01&Class_Id=first
> Line: 63
> 
> ------------------------------------------
> <a id="bottomback" name="bottomback" class="back" href="<?echo
> $Back_Link?>;showmouse();"></a>
> 
> <script type="text/javascript">
> document.getElementById("bottomback").appendChild(top.bottombar
> [1][<?=$Language_Id?>]);
> </script>
> 
> ------------------------------------------
> 
> Any ideas, I have googled but it didn't help much.
> 
> --
> Warm Regards
> ~~~~~~~~~~~~~~~
> Vinayak
> http://theregoesanotherday.blogspot.com/
> --
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
> 


-- 
Chris Heilmann 
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/  
Binaries: http://www.onlinetools.org/


More information about the thelist mailing list