Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] document.getElementById has no properties
- From: junado at junado.com (Julien Nadeau)
- Subject: [Javascript] document.getElementById has no properties
- Date: Tue Sep 20 19:22:15 2005
It's hard to get an idea of what's going wrong without a live
example, but I can think of two things:
1) Your $Back_Link PHP variable could contain faulty characters (I'm
thinking about \, ', "... theses chars, if not escaped, would wreck
havoc on your "rendered" source).
or 2) If your PHP is configured with register_globals = off,
$Language_Id should be called as $_GET['Language_id'] (turning off
register_globals is a good thing, too).
If this is not the problem, I would suggest you start debugging by
changing the appendChild statement to try and append a textNode to
your <a> tag, just to see if this works. If it does, then you know
that you have to narrow your debugging to your top.bottombar[1][<?=
$Language_ID?>] part.
Something like this:
<script type="text/javascript">
var text = document.createTextNode("This works!");
document.getElementById("bottomback").appendChild(text);
</script>
Julien Nadeau
junado@xxxxxxxxxx
Le 05-09-20 ? 06:04, Vinayakam Murugan a ?crit :
> 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/
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.LaTech.edu/pipermail/javascript/attachments/20050920/33383f97/attachment.html
- 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] document.getElementById has no properties
- Previous by thread: [Javascript] document.getElementById has no properties
- Next by thread: [Javascript] document.getElementById has no properties
- Index(es):