views:

34

answers:

1

I have a function that resizes the col width ratio of my frameset in "frame.html":

<frameset id="set" cols="*,*" FRAMESPACING=0 BORDER=3 BORDERCOLOR=#eeeeee>
    <frame src="index.html">
    <frame src="index2.html"> 
    <noframes></noframes> 
</frameset> 

The function works fine when called from "frame.html", However i want to call said function from the child file "index.html"... the function needs to remain in the parent file in order to run properly... How can I call my function in frame.html from index.html

+3  A: 

Just try parent.functionName() it should work.

Edit


Just to be sure that the scope is correct you should probably call window.parent.functionName() instead to be sure that it is actually the frames parent that is referenced

Edit 2


Check out this answer it seems to handle the same chrome issue.

Hope it helps!

Charlie boy
Hey this works in FF, but not in Google Chrome...
David
nevermind, Chrome doesn't permit reference to the "file://" protocol, after uploading to my webserver, everything worked fine... thanks
David