mg262@despammed.com wrote:
> I've recently written a web site for a registered charity I'm involved
> with; the web site works fine when you link to it directly, but after
> we bought a domain name, JavaScript errors keep popping up.
> (Particularly 'Object required' in IE.) I know that they relate to the
> collapsible menu I put in the left frame, but I can't pinpoint what's
> happening... I had similar errors while developing the web site which
> (after extensive searching!) I solved by moving the JavaScript to the
> end of the file (to prevent it from referencing ids that hadn't been
> declared yet), but this time I'm thoroughly stuck.
>
> The web site is currently at
>
> http://people.pwf.cam.ac.uk/rjf30/
>
> And the domain name pointing to it is
>
> http://www.bridgestobelarus.org.uk/
>
> This is the first website I've written, so I'm well out of my depth...
> we would be very, very grateful for any help.
The problem is in this code:
top.frames[0].document.getElementById('newssubmenu').style.display='none';
And all lines similar.
In simplified terms, the company you bought the website from has
wrapped your existing website in a framset. So when you say
'top.frames', you're referring to *their* frameset and not yours.
The simplest solution is to use 'parent.frames' if you want to go up
the frames heirarchy one step, or parent.parent.frames for two steps,
et cetera.
Received on Tue Oct 18 03:02:50 2005