Web Hosting Talk







View Full Version : Frame Manipulation


quark122
02-08-2005, 09:27 AM
Hi,

I have a site with 2 sets of frames... the first set divides the screen top to bottom - the top portion is about 80% of the screen, the bottom is 20%.

The embedded frame splits the top portion into a left & right frame.

My plan is to design this as a 'lifes events' pictures site... in the bottom 20% frame, is a list of events in my family's life (wedding, trips, etc.). When someone clicks on an event, a page opens in the left frame that displays various collections of pictures, articles, etc. from that event.

What I'd like to have happen is when that left frame opens, it automatically triggers a particular page to open in the right frame.

I'm drawing a blank on how to pull this trick off... I'm fairly certain it is possible.

Thanks!

--Will

E:magine - Aaron
02-08-2005, 09:53 AM
when the URL is tranferred into the left frame, set a onload="right frame name.href.location ='location for right side';"

so something on the lines of
right_frame.href.location ='details.asp?ID=2';

quark122
02-08-2005, 10:13 AM
OK... that didn't work... I put:

<BODY onload="pictures.href.location='picturesmain.php';">

My 3 frame names are triplist, list & pictures.

And got the wonderful javascript error: 'pictures' is undefined.

quark122
02-08-2005, 10:17 AM
Here's the frame generation code:

<frameset rows="90%, *">
<frameset cols="20%, *">
<frame src="wedding/picslist.html" name="list" />
<frame src="wedding/picturesmain.php" name="pictures" />
</frameset>
<frame src="travels.html" name="triplist" />
</frameset>

E:magine - Aaron
02-08-2005, 10:17 AM
thats why.. try pictures.locatiion.href

sorry about that wan't thinking correct

quark122
02-08-2005, 10:22 AM
Got it... top.pictures.location.href... :-)