Results 1 to 2 of 2

Thread: Java script frame

  1. #1
    Join Date
    Jan 2006
    Location
    At home
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java script frame

    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?

  2. #2
    Join Date
    Feb 2007
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You mean something like this?

    Code:
    <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&#37;,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.
    "Rock and roll ain't noise pollution." - AC/DC

    http://www.blake-foster.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •