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> &lt;<a href="mailto:wdlists@triche-osborne.com">wdlists@triche-osborne.com</a>&gt; 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>&gt; Hi<br>&gt;<br>&gt; I am trying to append a preloaded image to a tag. It is giving me the<br>&gt; following error<br>&gt;<br>&gt; Error: document.getElementById(&quot;bottomback&quot;) has no properties
<br>&gt; Source File:<br>&gt; <a href="http://192.168.100.11/app_dir/layout/preload.php?Language_Id=01&amp;Class_Id=first">http://192.168.100.11/app_dir/layout/preload.php?Language_Id=01&amp;Class_Id=first</a><br>&gt; Line: 63
<br>&gt;<br>&gt; ------------------------------------------<br>&gt; &lt;a id=&quot;bottomback&quot; name=&quot;bottomback&quot; class=&quot;back&quot; href=&quot;&lt;?echo<br>&gt; $Back_Link?&gt;;showmouse();&quot;&gt;&lt;/a&gt;
<br>&gt;<br>&gt; &lt;script type=&quot;text/javascript&quot;&gt;<br>&gt; document.getElementById(&quot;bottomback&quot;).appendChild(top.bottombar<br>&gt; [1][&lt;?=$Language_Id?&gt;]);<br>&gt; &lt;/script&gt;<br>&gt;<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(&quot;bottomback&quot;).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>&quot;top.bottombar has no properties&quot;. It writes out the following script<br>source code:
<br>document.getElementById(&quot;bottomback&quot;).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>