PDA

View Full Version : Intro Page to Frames



Vandel212
April 13th, 2010, 04:56 PM
My website currently has an intro page that gives links to the rest of the website, but the rest of my site is made up of three frames: two of which are not supposed to change and the third one which will connect to different source pages for content. How would I go from the intro page to the page with frames, but have the third frame be whichever link they clicked on, on the intro page.

the other issue would be how to set it up in flash, becuase the intro page is flash based.

Here is my intro page so you can see what I mean:

www.randellmcglynn.com (http://www.randellmcglynn.com)

Thanks.

icio
April 13th, 2010, 06:18 PM
Either have two different container pages which have different default pages in the main content frame or use a server-side programming language such as PHP which will point the frame at the correct location.

Vandel212
April 14th, 2010, 10:18 AM
I have never programmed with PHP before, any good PHP learning sites?

Is it possible to pass values from a flash .swf file to php?

icio
April 14th, 2010, 10:27 AM
You could always duplicate your page, changing the source of the frame as necessary.

E.g.
index1.html

... <frame src="first.html"></frame> ...
index2.html

... <frame src="second.html"></frame> ...

Vandel212
April 14th, 2010, 11:12 AM
Do you mean make 6 different pages (each with a different source for the main frame) and have the flash link to them appropriately?

icio
April 15th, 2010, 06:26 AM
That's exactly what I'm saying. It's the only way you can do it without some sort of coding.

Vandel212
April 15th, 2010, 09:51 AM
That sounds simple enough, but I'm also interested in the coding method. This website is for two purposes, as a sample website, and as a means to learn about web development. So I would like to learn how to do that. I just have to figure out how to pass values from flash to php or some other programming language. If its possible of course.

icio
April 15th, 2010, 10:17 AM
This would be fairly easy to code. Instead of linking to contact.html and about.html your Flash movie would link to index.php?page=contact and index.php?page=about, respectively.

The file index.php would then look something like this:

<?php

// The pages that you can link to
$pages = array('main.html', 'about.html', 'contact.html');

// See if a specific page has been requested for the frame
if (isset($_GET['page'])) {
// Get the relevant file
$page = $_GET['page'] . '.html';
// Check that this is an okay page to link to
if (!in_array($page, $pages)) unset($page);
}
// If we haven't had a valid request for a page, default to the first listed in $pages
if (!isset($page)) $page = $pages[0];
?>
... <frame src="<?php echo $page; ?>"></frame> ...

I recommend you follow some beginners' tutorials on PHP if you are interested in learning more. Hope that helps :thumb: