multiload pages into multiple frames?

liunx

Guest
Hello,<br />
I'm using frames in a webpage. I'm trying to get one page in a frame to autoload a second page in another frame when that first page is opened. Essentially trying to get one link to open two pages in two frames. I would like to extend this to 3 pages in three frames if possible. Any help is greatly appreciated.<!--content-->For the sake of my explaination, which might be wrong, I'm naming them framA and frameB<br />
<br />
I think you should be able to make the HTML src of the page being displayed in frameA have something like this attached:<br />
<body onLoad="frameB.location='TheNewPage'"><br />
Then when the first page loads, it makes the next page load too.<br />
That is the only way I know how to do it. If you're using a link instead of OnLoad then just make an onClick statement within the link that says the same as that onLoad method.<!--content-->Thanks for the help. I'm still having trouble though. i tried using your suggestion, but I it doesn't seem to be working. here are some samples of the actual line of codes i tried<br />
<br />
<BODY onLoad="list2.location='black.html'" BGCOLOR="#000000"><br />
<br />
or <br />
<br />
<BODY onLoad="list2='black.html'" BGCOLOR="#000000"><br />
<br />
where "list2" is the frame name i'm trying to autoload "black.html" to<br />
<br />
nothing seems to be happening.... I am also using a java script for creating a pulldown menu. Could this be causing conflicts with the onload command? More suggestions are welcomed.<br />
<br />
Here is the entire file<br />
<br />
<br />
<HTML><br />
<HEAD><br />
<br />
<TITLE></TITLE><br />
<br />
<br />
<script ><br />
<br />
<!--<br />
function land(ref, target)<br />
{<br />
lowtarget=target.toLowerCase();<br />
if (lowtarget=="_self") {window.location=loc;}<br />
else {if (lowtarget=="_top") {top.location=loc;}<br />
else {if (lowtarget=="_blank") {window.open(loc);}<br />
else {if (lowtarget=="_parent") {parent.location=loc;}<br />
else {parent.frames[target].location=loc;};<br />
}}}<br />
}<br />
function jump(menu)<br />
{<br />
ref=menu.choice.options[menu.choice.selectedIndex].value;<br />
splitc=ref.lastIndexOf("*");<br />
target="";<br />
if (splitc!=-1)<br />
{loc=ref.substring(0,splitc);<br />
target=ref.substring(splitc+1,1000);}<br />
else {loc=ref; target="_self";};<br />
if (ref != "") {land(loc,target);}<br />
}<br />
//--><br />
</script><br />
<br />
</HEAD><br />
<br />
<BODY onLoad="list2.location='black.html'" BGCOLOR="#000000"><br />
<br />
<br />
<p><form action="dummy" method="post"><select name="choice" size="1" onChange="jump(this.form)"><br />
<option value="">Select Category</option><br />
<option value="">--------------------------------------</option><br />
<option value="">Photography</option><br />
<option value="list-photo-abstract.html*list2">__Abstracts</option><br />
<option value="">__Details</option><br />
<option value="">__People</option><br />
<option value="">__Scenes</option><br />
<option value="">__Objects</option><br />
<option value=""> </option><br />
<option value=""> </option></option><br />
<option value=""> </option><br />
<option value=""> </option><br />
<option value=""> </option><br />
</select></form><p><br />
</BODY><br />
</HTML><!--content-->http://www.snippetlibrary.com/code.php?id=5&kid=21&catname=Frames<!--content-->Now that I see the code I am sure the last stuff I told you isn't what you want. I'll look around and see what I can find.<!--content-->Okay. That page that scoutt gave you is what I was trying for. I took the source that you have and did a little moddy to it. Here's what I got:<br />
<script ><br />
<!--<br />
function jump(menu) {<br />
ref=menu.choice.options[menu.choice.selectedIndex].value;<br />
parts=ref.split("*");<br />
window.alert("Got here");<br />
parent.frames[parts[1]].location.href=http://www.htmlforums.com/archive/index.php/parts[0];<br />
parent.frames[parts[3]].location.href=http://www.htmlforums.com/archive/index.php/parts[2];<br />
}<br />
//--><br />
</script><br />
</head><br />
<body bgcolor="#000000"><br />
<p><form action="dummy" method="post"><select name="choice" size="1" onChange="jump(this.form)"><br />
<option value="">Select Category</option><br />
<option value="">--------------------------------------</option><br />
<option value="">Photography</option><br />
<option value="untitled2.html*1*untitled.html*0">__Abstracts</option><br />
You don't need all of that script that you had. The script that I have there should do it. The untitled pages can be changed to whatever you want. The reason that it was working is because of the:<br />
"list-photo-abstract.html*list2" that you had in before.<br />
The parent.frames[] is an array of the frames that you had. List2 is the target that you want but is not an array value. The array starts with 0 and goes up. The first frame in your frameset is the 0 in the array and it keeps going up. You were placing a name into the array instead of a number. I hope that makes sence. If it doesn't PM me and I'll try to explain better.<!--content-->That worked out great.... If you're interested, I'll let you know what the web address is once I put it up.<br />
<br />
Thanks so much.<!--content-->
 
Back
Top