Link to an iFrame

Status
Not open for further replies.

Ronan O'F

New Member
OK, I have been wondering how I can get this to work.

I am creating a splash page, with links to certain areas of content on my site. So this HTML splash page appears on its own separate.

Now, the site is run from one page page with an iFrame in it, from which all the site's content is accessed.

Now, on the splash page, if I create a link to a page within the site, how do I get the iFrame page to load with the content inside on the iFrame?

Many thanks for anyone who can help.

Ronan.
 

Forbairt

Teaching / Designing / Developing
this sounds pretty bad for SEO .. but anyways ...

if you have the index page ? which contains the iframe ? what you could do (depending on the language you are using) ... pass in a variable when you are linking to the specific page

mydomain/index.php?page=about

then your iframe could load the about page ?
 

Forbairt

Teaching / Designing / Developing
a quick look gave me this page


Parsing The Querystring with Javascript


You'll have to hack the Javascript a bit (obviously) ... but you should be able to parse the URL with the query string and then with a onload you should be able to update the iframe with whichever page you want :)

(untested but it should work)
 
Status
Not open for further replies.
Top