On Nov 11, 4:58 pm, Devweb <[EMAIL PROTECTED]> wrote:
>
> Could anyone advise a fix please?

I can make it work by moving the niftycube scripts from the head to
the end of the body.

At the time it runs in the head, window.onload [and oldonload within
the Nifty script] is undefined, because <body onload> hasn't yet been
reached. It then sets window.onload to do the Nifty stuff. The parser
then reaches <body onload> and promptly overwrites the window.onload
event so the Nifty stuff isn't run.

If you don't have a <body onload>, everything will work fine because
Nifty sets window.onload as it should. If you *do* have a <body
onload> the parser will set window.onload when it reaches that line,
so you need to make sure that the Nifty scripts are run *after* that
so that their work is added to the page's onload handler.

Example 13 in the docs doesn't use <body onload>, it's demonstrating
that it works with an existing window.onload statement.

Another way of making it work keeping the scripts where they are is
not to use <body onload>, but to add window.onload=load; before the
Nifty calls in the head, like Example 13 does.

Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to