SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Feb 24, 2004, 06:12 #1
- Join Date
- Apr 2001
- Posts
- 194
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How can I link directly to an iFramed page?
Here’s my dilemma I’ve just created a site containing a content iframe the problem that I have is that an external site would like to link directly to one of the iFrame pages. I could give them the direct link to the iFrame page but it would only link to that page and lose the entire nav etc. If there a script trick that I can do to link to the main index page and jump to the iFramed page that I need.
Hope it makes sense it was pretty hard to explain!
Cheers,
dEVS!
-
Feb 24, 2004, 07:48 #2
- Join Date
- Nov 2002
- Location
- Central PA
- Posts
- 1,146
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm not totally sure what you are trying to achieve but if you want everything ("entire nav, etc.") on the page that has the iFrame to be seen then they would simply link to that page, not the one inside the frame.
-
Feb 24, 2004, 11:14 #3
- Join Date
- Apr 2001
- Posts
- 194
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorry I probably did not explain it very well – Lets try again…
I want to have an external link that loads my site with a specific page in the iframe? rather than the default one.
Hope that makes a little more sense?
Thx!
-
Feb 24, 2004, 11:34 #4
- Join Date
- May 2003
- Posts
- 1,843
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You'll need to script this.
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>untitled</title> <script type="text/javascript"> onload = function() { var Qstr = location.search.substring(1); if (Qstr != '') document.getElementById('foo').src = unescape(Qstr); else document.getElementById('foo').src = 'http://www.google.com'; } </script> </head> <body> <iframe id="foo" width="600" height="460" src="about:blank"></iframe> </body> </html>
::: certified wild guess :::
-
Feb 24, 2004, 11:56 #5
- Join Date
- Apr 2001
- Posts
- 194
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
great many many thanks for that! Just what I needed!
Cheers,
dEVS!
Bookmarks