Click to See Complete Forum and Search --> : Script in one frame calling a script in another frame


JK99
10-14-2003, 12:11 PM
Hi All…

I have a simple frameset made up of just two frames that split the screen vertically (NAME="left" and NAME="right")

The frame on the right has links. I’d like to be able when a certain link is clicked in the right frame for it to be able to call a script that is coded in the page that’s loaded in the left frame, so it can make changes to the left frame without affecting the contents of the right frame.

Could someone please let me know if this is possible and if so a sample of the required code would be very much appreciated..

Khalid Ali
10-14-2003, 12:26 PM
parent.frameName.functionName();

or

parent.frameName.globalVariableName;

JK99
10-14-2003, 01:11 PM
Hi Khalid Ali and thanks...

I forgot to mention what is likely a significant point which is that the frameset that contains the two frames ‘left’ and ‘right’ is a nested frameset.

I’ve tried using parent.frameName.functioName() but I keep getting an error:

In Netscape: parent.frameName has no properties

And in IE: parent.frameName is null or not an object

Everything works when the frameset is not nested but fails as soon as it’s nested…I’ve also tried top.frameName.functionName() but get the same errors..

Any ideas ?