Hi<br><br>The problem got resolved. I put the appendchild code in the onload event of body and it worked.<br><br>Thanks for your help.<br><br><div><span class="gmail_quote">On 9/20/05, <b class="gmail_sendername">Triche Osborne
</b> <<a href="mailto:wdlists@triche-osborne.com">wdlists@triche-osborne.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Vinayakam Murugan wrote:<br>> Hi<br>><br>> I am trying to append a preloaded image to a tag. It is giving me the<br>> following error<br>><br>> Error: document.getElementById("bottomback") has no properties
<br>> Source File:<br>> <a href="http://192.168.100.11/app_dir/layout/preload.php?Language_Id=01&Class_Id=first">http://192.168.100.11/app_dir/layout/preload.php?Language_Id=01&Class_Id=first</a><br>> Line: 63
<br>><br>> ------------------------------------------<br>> <a id="bottomback" name="bottomback" class="back" href="<?echo<br>> $Back_Link?>;showmouse();"></a>
<br>><br>> <script type="text/javascript"><br>> document.getElementById("bottomback").appendChild(top.bottombar<br>> [1][<?=$Language_Id?>]);<br>> </script><br>><br>
I tested this twice, once with a child SPAN I made up and once with your<br>URL query but without (obviously) your image array.<br><br>The first test looked like this:<br>document.getElementById("bottomback").appendChild(newSpan);
<br><br>It successfully attaches the span to bottomback.<br><br>The second test worked as I expected, returning the error message<br>"top.bottombar has no properties". It writes out the following script<br>source code:
<br>document.getElementById("bottomback").appendChild(top.bottombar[1][01]);<br><br>Neither of these tests refuses to recognize bottomback itself. (Though<br>unless your PHP is printing more than just a URL there, that showmouse()
<br>function is out of place.)<br><br>Since the SPAN attached just fine, recheck the code that you're using to<br>create the top.bottombar array to be sure there's something there. Also,<br>be sure that you are recognizing 01 in the second dimension, not just 1.
<br><br>Triche<br><br>_______________________________________________<br>Javascript mailing list<br><a href="mailto:Javascript@LaTech.edu">Javascript@LaTech.edu</a><br><a href="https://lists.LaTech.edu/mailman/listinfo/javascript">
https://lists.LaTech.edu/mailman/listinfo/javascript</a><br></blockquote></div><br><br clear="all"><br>-- <br>Warm Regards<br>~~~~~~~~~~~~~~~<br>Vinayak<br><a href="http://theregoesanotherday.blogspot.com/">http://theregoesanotherday.blogspot.com/
</a>