• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 632
  • Last Modified:

Javascript to open frame as full window

I have a custom homepage on my server that has three frames.  frame1.html is a very small frame that actually has two small search boxes, one for google and one for wikipedia.  After I search, I can right click on firefox and tell the browser to make this frame1 the whole window.  I want to find a way to do that automatically after the search button is pushed because anytime I use that frame, I always want to go full screen with that one frame automatically (see frame1.html below the homepage html)  I want to add java script inside of the frame1.html so that the search will automatically make that frame (the search results) the whole window--orif this is not possible, at least open the results in a new browser tab or window.

<FRAMESET cols="20%, 80%">
  <FRAMESET rows="100, 200">
      <FRAME src="frame1.html">
      <FRAME src="frame2.html">
  <FRAME src="http://del.icio.us/myaccount">
      <P>This frameset document contains:
         <LI><A href="frame1.html">Some neat contents</A>
         <LI><IMG src="frame2.html" alt="A neat image">
         <LI><A href="frame3.html">Some other neat contents</A>
*** frame1.html
<body bgcolor="#FFFFFF">
<form method="get" action="http://www.google.com/search">
<input type="text"   name="q" size="31"
 maxlength="255" value="" />
<input type="submit" value="Google Search" />
<form action="http://www.wikipedia.org/search-redirect.php" method="get">
<input type="hidden" name="language" value="en" />
<input type="text" name="search" size="20" />
<input type="submit" name="go" value="Wikipedia Search" />

Open in new window

1 Solution
Try this in your form...

<form method="get" action="http://www.google.com/search" target="_top">


<form action="http://www.wikipedia.org/search-redirect.php" method="get" target="_top">

to open both form results above all the frames.
Michel PlungjanIT ExpertCommented:
PS: Java is not javaSCRIPT so I changed the title and tags...

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now