Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] document.getElementById has no properties
- From: wdlists at triche-osborne.com (Triche Osborne)
- Subject: [Javascript] document.getElementById has no properties
- Date: Tue Sep 20 13:54:06 2005
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
- Follow-Ups:
- [Javascript] document.getElementById has no properties
- From: Vinayakam Murugan
- [Javascript] document.getElementById has no properties
- References:
- [Javascript] document.getElementById has no properties
- From: Vinayakam Murugan
- [Javascript] document.getElementById has no properties
- Prev by Date: [Javascript] Controling a SELECT from a child window
- 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):