Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] document.getElementById has no properties
- From: mvinayakam at gmail.com (Vinayakam Murugan)
- Subject: [Javascript] document.getElementById has no properties
- Date: Tue Sep 20 20:55:50 2005
Hi
The problem got resolved. I put the appendchild code in the onload event of
body and it worked.
Thanks for your help.
On 9/20/05, Triche Osborne <wdlists@xxxxxxxxxxxxxxxxxx> wrote:
>
> Vinayakam Murugan 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>
> >
> I tested this twice, once with a child SPAN I made up and once with your
> URL query but without (obviously) your image array.
>
> The first test looked like this:
> document.getElementById("bottomback").appendChild(newSpan);
>
> It successfully attaches the span to bottomback.
>
> The second test worked as I expected, returning the error message
> "top.bottombar has no properties". It writes out the following script
> source code:
> document.getElementById("bottomback").appendChild(top.bottombar[1][01]);
>
> Neither of these tests refuses to recognize bottomback itself. (Though
> unless your PHP is printing more than just a URL there, that showmouse()
> function is out of place.)
>
> Since the SPAN attached just fine, recheck the code that you're using to
> create the top.bottombar array to be sure there's something there. Also,
> be sure that you are recognizing 01 in the second dimension, not just 1.
>
> Triche
>
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
--
Warm Regards
~~~~~~~~~~~~~~~
Vinayak
http://theregoesanotherday.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.LaTech.edu/pipermail/javascript/attachments/20050921/a03dbed3/attachment.html
- References:
- [Javascript] document.getElementById has no properties
- From: Vinayakam Murugan
- [Javascript] document.getElementById has no properties
- From: Triche Osborne
- [Javascript] document.getElementById has no properties
- Prev by Date: [Javascript] document.getElementById has no properties
- Next by Date: [Javascript] Controling a SELECT from a child window
- Previous by thread: [Javascript] document.getElementById has no properties
- Next by thread: [Javascript] document.getElementById has no properties
- Index(es):