Your frames page probably looks something like this:

<html>

<head>
<title>Frames</title>
</head>

<frameset cols="220,*">
<frame name="contents" target="main" src="Tree.htm">
<frame name="main" src="OtherThing.htm">
<noframes>
<body>
<p>You don't have frame support.
</body>
</noframes>
</frameset>
</html>

In which case, either of these will do the job:
window.parent("main").navigate("http://www.codeguru.com")
window.parent.main.navigate("http://www.codeguru.com")