View Full Version : Java script frame

02-24-2007, 09:01 AM
I am looking for the script that opens a specific link in the page which contains two window. as Google photo search open any searched photo. I remember i had seen this script somewhere on dynamic drive. But unable to recall where it was. any idea where I can get it?

02-25-2007, 04:59 PM
You mean something like this?


<script type="text/javascript">
var frame1 = '<frame src="http://www.google.com">';
var frame2 = '<frame src="' + window.location.search.substring(1) + '">';

document.write('<frameset rows="25&#37;,75%">');


Put that code in an html file, and link to it, with a question mark followed by a url after it on the end of the url of the file. It will open as a page with 2 frames, with the url you put after the question mark in the bottom frame.

For example, if the file is called frames.html, if you go to frames.html?http://www.dynamicdrive.com, dynamic drive will come up in the bottom frame.