• 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.


**** THE HOME PAGE :
 
<html>
<head><title>Mytitle</title></head>
 
<FRAMESET cols="20%, 80%">
 
  <FRAMESET rows="100, 200">
      <FRAME src="frame1.html">
      <FRAME src="frame2.html">
  </FRAMESET>
 
  <FRAME src="http://del.icio.us/myaccount">
 
  <NOFRAMES>
      <P>This frameset document contains:
      <UL>
         <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>
      </UL>
  </NOFRAMES>
</FRAMESET>
 
</html>
 
*** frame1.html
 
<html>
<head>
<title></title>
</head>
<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>
 
<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" />
</form>
 
</body>
</html>

Open in new window

0
cglenn3932
Asked:
cglenn3932
1 Solution
 
RouchieCommented:
Try this in your form...

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

and

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

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

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