We help IT Professionals succeed at work.

Javascript to open frame as full window

cglenn3932
cglenn3932 asked
on
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

Comment
Watch Question

CERTIFIED EXPERT
Commented:
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.
Michel PlungjanIT Expert
CERTIFIED EXPERT
Top Expert 2009

Commented:
PS: Java is not javaSCRIPT so I changed the title and tags...

Explore More ContentExplore courses, solutions, and other research materials related to this topic.