View Full Version : Java script frame
vaibhav24in
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?
Blake
02-25-2007, 04:59 PM
You mean something like this?
<html>
<head>
<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%,75%">');
document.write(frame1);
document.write(frame2);
document.write('</frameset>');
</script>
</head>
</html>
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.