HTML framesets: How to redirect WHOLE page, instead of redirecting only a single frame?

I have the following setup, the webpage (homepage.php) is divided into three HTML frames: wherein topnav contains a search input field, and whole page should be redirected to the search results page when a search is performed.

enter image description here

What I want to do is, when the user performs a search using the top nav search bar, the search results page (results.html), the whole page should be redirected to the path generated by the searchit() function

What currently happens is the search results gets displayed only in the topnav frame instead.

homepage.php

<frameset rows="124,*" cols="*" frameborder="NO" border="0" framespacing="0"> 
    <frame name="topnav" noresize="" scrolling="NO" src="/Templates/topnav.php" />
  <frameset rows="*" cols="240,*" frameborder="NO" border="0" framespacing="0"> 
  <frame name="leftnav" scrolling="YES" noresize="" src="/Templates/leftnav.php" />
    <frame name="body" src="main.php" scrolling="AUTO" />
  </frameset>
</frameset>

topnav.php

<script language="javascript" type="text/javascript">
    function searchit(){
                
    var qvalue  =   document.getElementById("q").value;
    var sortvalue   =   "relevancy";
                var path="example.com/results.html#q="+qvalue+&sort="+sortvalue+"";
                document.getElementById("seek").action=path;
            window.document.URL=path;
//              return true;
                return false;
                }
</script>
<form action="" method="post" name="seek" id="seek" onSubmit="searchit();" autocomplete="off">
<input name="q" type="text" id="q" />
<input type="submit" value="submit" name="submit" />
</form>