kivbarton
12-01-2004, 09:43 AM
can anyone help.
i am using a frames to seperate my navigation. i need one of the link to open a page in the main window as well as the _self window.
does anyone know the script to do this
i know it is possible as i have done it before.
here is the domain i am trying to do it to http://www.earththecalifornianlovedream.com
i want one of the links at the top to open a page in both top and bottom pages.
cheers kev
chinchilla2
12-07-2004, 03:07 PM
Kev,
Here ya go.
<!-- TWO STEPS TO INSTALL CHANGE 2 FRAMES (FRAMESET):
1. Copy the frameset code into your HTML document
2. Be sure to give each frame a unique 'name' -->
<!-- STEP ONE: Copy this FRAMESET code into your FRAMESET page -->
<html>
<head>
<title>Your Site's Title Here</title>
</head>
<frameset cols="160,*">
<frame src="http://www.yoursite.com/links-page.html">
<frameset rows="50%,50%">
<frame src="http://www.yoursite.com/top-page.html" name="Frame_A">
<frame src="http://www.yoursite.com/bottom-page.html" name="Frame_B">
</frameset>
</frameset>
</html>
<!-- STEP TWO: Give each frame a name! (frame name="left") -->
Once you do that... then you have to do this...
<!-- TWO STEPS TO INSTALL CHANGE 2 FRAMES (LINKS PAGE):
1. Put the first code in the HEAD of your links page
2. Copy the links code into the BODY of your links page -->
<!-- STEP ONE: Put this code into the HEAD of your links document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function checkMenu(param) {
if (param != "'','','',''")
eval('loadFrames(' + param + ')');
}
function loadFrames(frame1,page1,frame2,page2) {
eval("parent."+frame1+".location='"+page1+"'");
eval("parent."+frame2+".location='"+page2+"'");
}
// End -->
</script>
</head>
<!-- STEP TWO: Change all the links to the BODY of your links page -->
<BODY>
Our Links...<br>
<br>
Click a menu option below to get started!
<br>
<br>
<form>
<select name=sitemenu onChange="checkMenu(this.options[this.selectedIndex].value)">
<option value="'','','',''">Please select an item below:</option>
<option value="'Frame_A','http://javascript.internet.com/feedback.html', 'Frame_B','http://javascript.internet.com/toc.html'">Load Feedback & Table of Contents Pages</option>
<option value="'Frame_A','http://e-newsletters.internet.com/javascriptsource.html', 'Frame_B','http://forum.javascriptsource.com'">Load Newsletter & JavaScript Forum Pages</option>
</select>
</form>
<a href="no-frames-home.html" target="_top">Go to site without frames</a></center>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 0.96 KB -->
I kept the location where I picked this up at in the script since it's not one of my original scripts.
chinchilla2
12-07-2004, 04:10 PM
Found another way to do this. Knew it was out there but couldn't remember exactly where til now...
Change Multiple Frames in One Click (http://www.htmlgoodies.com/tutors/2atonce.html)
That way if you have another script on your site you won't wind up with a conflict
Powered by vBulletin® Version 4.2.2 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.