View Full Version : Passing Data/Variables between frames

11-17-2009, 12:57 AM
Was wondering if someone could help me out with this. I have a frameset

<frameset cols = "20%, *">
<frame src ="dates.html" name="Days" noresize />
<frame src ="start.html" name="Pictures and Reports" noresize scrolling="auto" />

where it calls a file that has several dates (<td width="132" height="10" ><a href="10-28-09/popup.html" target="Pictures and Reports">10-28-09</a></td></tr>).

When I click on a date it opens up a file called popup.html for that specific date. In the popup.html file the user can click through pictures for that day. Then go back to the date side and click another day and so on. Is it possible to display on the picture side the date I selct on the left side. For example I would like to say on the pictures side that - "You are viewing 10-28-09"

I tried to use the a:active link in CSS, but when I select the picture window on the reight it deselects my active link.

a:link {
text-decoration: none;
a:visited {
text-decoration: none;
a:hover {
color: #FF6600;
a:active {
font-size: 13px;

Thank you for any help you can give.

11-17-2009, 02:43 AM
i don't get it, so you want to open that link into a pop-up or just open it as a frame?

if you want to open it as a pop up use this one:

<!-- put this on the head -->
<script language="JavaScript">
function popUpWin(theURL,winName,features) { //v2.0

<a href="javascript:;" onclick="popUpWin('10-28-09/popup.html','popUpCaseStudies','width=750,height=600,scrollbars')">10-28-09</a>

good luck...

11-17-2009, 03:11 AM
It's in a frame. Popup just happened to be the name of the file that displays the pictures in the right frame. I did a screen shot of part of the screen - see attached.

Thanks for your previous post.

11-17-2009, 01:08 PM
sorry for making you wait.

this is the example i already make, may be it suit with your case:

FrameSet Example (http://www.dynamicdrive.com/forums/attachment.php?attachmentid=3007&stc=1&d=1258463248)

hope this help, good luck...:)

11-17-2009, 01:27 PM
Thanks for the response, but maybe I'm not asking the question the right way. If I have two frames, in one frame I have several links (dates) and when I click on a date it displays a new page in the second frame.

Is it possible to display the link I clicked on (or just the date) in Frame #1 in Frame #2?

11-18-2009, 05:10 AM
using javascript??

i don't know the easiest way, but i've seen this script before:


you can use make navigation at #frame1 and the content / fading pictures in #frame2.

Really sorry if make a mistake again.

11-18-2009, 05:24 AM
This sounds like what is often called a breadcrumb. As in the fairy tale of the kids in the woods leaving breadcrumbs so that they could find their way back home. The birds ate the bread, and the witch ate the kids, or something like that. Hansel and Gretal I think it was called.

But what you are proposing is a bit more limited than that (thank goodness for those kid's sake).

Really though, the easiest (and most fool proof) method is just to hard code the information on the page. Say I click on 8/2/01 (m/d/y format) in one frame, the page it loads into the other frame could simply have as its title and/or as a major heading:

August 2nd, 2001

Just hard code that right into the page.

11-18-2009, 02:23 PM

I was originally going to hard code it into the file, but I was looking for alternatives to doing that. I'm using the directory structure information you helped me on the other thread. Pictures come in daily for our different projects that we do and are put into the corresponding date folder. I've attached an image showing - almost - the final product. Thanks for the help.

Hansel (I would have used the bread to make a sandwich).

11-19-2009, 01:46 AM
You can do it with php, if you have it installed. Whats the naming convention for the directories mm.dd.yyyy?