Dear All,

Let you know why this problem is coming. Actually I am
a bit busy with my work, if not I would have sent the
cause.

Regards,
Malla


--- Ben Wong <[EMAIL PROTECTED]> wrote:

> It's because the code is being executed before the
> tags with the
> matching ids are created.
> 
> On 12/6/05, Chris Lamberson <[EMAIL PROTECTED]>
> wrote:
> > Through foresight, i already know this will be a
> very pitiful question to
> > real web designers, so bear with me.
> >
> > I was having some trouble finding out why,
> whenever I call for
> > document.getElementById(id), it returns null (even
> if there is a valid
> > id-matching element). Consider something simple,
> like this:
> >
> > <html>
> > <head>
> >      <title>JavaScript Testing</title>
> >      <style type="text/css" media="screen">
> >          a { font: normal 24px "Trebuchet MS"; }
> >         p { display: none; }
> >     </style>
> >      <script type="text/javascript">
> >         var toggle =
> document.getElementById('toggle');
> >          var onoff =
> document.getElementById('onoff');
> >         toggle.onmouseover = function() {
> >             onoff.style.display = 'inline';
> >          }
> >         toggle.onmouseout = function() {
> >              onoff.style.display = 'none';
> >         }
> >      </script>
> > </head>
> >  <body>
> >     <a id="toggle" href="#">Hover toggle</a>
> >      <p id="onoff">Hello world!</p>
> > </body>
> > </html>
> >
> > Sorry I don't have a live example. The point is
> that the getElementById()
> > calls for some reason appear to return null, as if
> they didn't find
> > anything. Thanks, any help is appreciated!
> >
> 
> 
> --
> Ben Wong
> e: [EMAIL PROTECTED]
> w: http://blog.onehero.net
>
******************************************************
> The discussion list for 
> http://webstandardsgroup.org/
> 
>  See
> http://webstandardsgroup.org/mail/guidelines.cfm
>  for some hints on posting to the list & getting
> help
>
******************************************************
> 
> 



                
__________________________________________________________

Enjoy this Diwali with Y! India Click here 
http://in.promos.yahoo.com/fabmall/index.html


                
__________________________________________________________ 
Enjoy this Diwali with Y! India Click here 
http://in.promos.yahoo.com/fabmall/index.html
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to