You might be better off referencing the frameset as top, rather than as parent. For example, paste this into the address bar of the browser:
Code:
javascript:for(var i = 0; i < top.frames.length; ++i)if(top.frames[i].name)alert(i + ' ' + top.frames[i].name)
and hit enter. You will get three alerts:
0 topFrame
2 co11
3 co12
Frame 1 has no name.
Now, as far as I can tell, you may have some confusion in your mind about what is col1 and col2 (neither of which exist in the current page) and co11 and co12 which do exist.
But, using the number, you can access any of the 4 frames from any of the pages contained in them:
Code:
top.frames[0].location.href='some.htm';
will load into topFrame
Code:
top.frames[1].location.href='some.htm';
will load into the unnamed frame
Code:
top.frames[2].location.href='some.htm';
will load into co11
Code:
top.frames[3].location.href='some.htm';
will load into co12
Since frame 1 (the unnamed frame) has no name, you cannot make a targeted link to it from another frame's page, but all the others may be linked to using target (this is just an ordinary link):
Code:
<a href="some.htm" target="co12">whatever</a>
A link like that can be combined with an onclick:
Code:
<a href="some.htm" target="co12" onclick="top.frames[2].location.href='some_other.htm';return true;">whatever</a>
That will load 'some.htm' into co12, and 'some_other.htm' into co11. It's really not any more complicated than that.
Bookmarks