iframes and email

Associate
Joined
30 Sep 2003
Posts
2,098
Location
Not so Sunny Dundee
My site uses Iframes, what I would like to do is provide a link in an email to friends which when clicked upon would open the main page of my site and rather than opening the standard page in the iframe open a specific page instead.

Is that possible?

Site - www.digitaldays.co.uk (its new so please stick with me lol) the area below the menu is the iframe which by default loads a page called home.html all other pages in the site then load into this iframe when picked from the menu.
 
I think the only way to do this would be via PHP. Using PHP includes would make the site cleaner and rid the need for iFrames, lest you really need to be able to scroll downward within the site frame.
 

close, but no lol

If you go the the main site, instead of seeing the "Welcome to digital days...." blurb which is home.html page shown in the iframe I would like to be able to format a link for emailing which would show the same page complete with menus etc but with a different target for the iframe, i.e click a link in an email and it would show the main site but with about.html as the iframe target.

I could always generate a brand new page from scratch which has a different iframe specified and send a link to that via email but that seems a long winded way to do it if there is a way to specifiy the iframe target instead.

I think the only way to do this would be via PHP. Using PHP includes would make the site cleaner and rid the need for iFrames, lest you really need to be able to scroll downward within the site frame.

Hmm, thought that would be the way, but I've never coded php so its a bit of a black art for me. I thought I had the iframe set to scroll, but it appears not. Will need to sort that thanks!
 
Last edited:
i needed to read both your posts about 4 times before i understood what you wanted, and to answer your question, no, there is no way to do what your after, using the current iframe method you have used.

you would need to change your content loading method to a php method like this for example

PHP:
<?php 
$page = $_GET['page'];
if ($page == ""){$page = "home";}
if (file_exists($page.".php")){include($page.".php");}
else{include("missing.php");}
?>

where you want your content to load.

then simply browsing to http://www.digitaldays.co.uk/?page=home would load the home page. you can tidy your urls up to make them more SEO (http://www.digitaldays.co.uk/news.xhtml) using your .htaccess, but thats all confusing to me, so i cant help ya there :(
 
Last edited:
Yeah, sorry I tied myself in knots trying to describe what I was trying to do.

I've set up a php index page http://www.digitaldays.co.uk/index.php by hacking the php code into the existing HTML and removing the iframe and it seems to work, although I'm sure my coding is pretty awful, sorry about that. I've had to update the menu with full links i.e. "http://www.digitaldays.co.uk/?page=Pages/Contact" but I'm sure there must be a better way to do this?

Cheers for the help so far:D
 
Last edited:
Back
Top Bottom