Linking to iframe

G

greencw3

Can I make a hyperlink (from email or an external site) to load a page
so that it is in its native setting, as it would be seen navigating
through our site, inside an iframe on the site's home page. Here is
the directory structure of the three pages in question:

home/folder1/index.htm
our home page containing all navigational links for the site; also
contains iframe (name=iframe), which holds all content as users
navigate through the site

home/folder1/iframe_main.htm
loads into the iframe by default when index.htm is accessed

home/folder2/news.htm
This is the page I would like to access externally and directly so that
it loads into the iframe on index.htm.

Is there a way to do this with a hyperlink, or do I need Javascript?

Thank you for considering my question.
 
R

richard

greencw3 said:
Can I make a hyperlink (from email or an external site) to load a page
so that it is in its native setting, as it would be seen navigating
through our site, inside an iframe on the site's home page. Here is
the directory structure of the three pages in question:

home/folder1/index.htm
our home page containing all navigational links for the site; also
contains iframe (name=iframe), which holds all content as users
navigate through the site

home/folder1/iframe_main.htm
loads into the iframe by default when index.htm is accessed

home/folder2/news.htm
This is the page I would like to access externally and directly so that
it loads into the iframe on index.htm.

Is there a way to do this with a hyperlink, or do I need Javascript?

Thank you for considering my question.

What you are proposing to do is known as "Stealing bandwidth" which could
result in your account being tossed.

For instance, your site is xyz.com and you want to display a frame page that
is hosted by abc.com.
That puts extra bandwidth usage on them and they could go over their
allotment and when they find out you caused it, you go down the tubes and
wind up paying them.
Best to just put a link to the page and open it in a new window.

Some jerk tried to make his visitors see my home page on his site.
I simply put in a line of javasctipt that directed his visitors to an adult
web site.
He got the message.
 
J

Jonathan N. Little

greencw3 said:
Can I make a hyperlink (from email or an external site) to load a page
so that it is in its native setting, as it would be seen navigating
through our site, inside an iframe on the site's home page. Here is
the directory structure of the three pages in question:

home/folder1/index.htm
our home page containing all navigational links for the site; also
contains iframe (name=iframe), which holds all content as users
navigate through the site

home/folder1/iframe_main.htm
loads into the iframe by default when index.htm is accessed

home/folder2/news.htm
This is the page I would like to access externally and directly so that
it loads into the iframe on index.htm.

Is there a way to do this with a hyperlink, or do I need Javascript?

Bingo! You have hit on maybe the #1 problem with FRAMES. You have to
utilize some kludge method of passing a parameter in the URL and either
process with JavaScript(bad) or server-side (bit better) or (best)
dump the frames...
 
J

jojo

richard said:
Can I make a hyperlink (from email or an external site) to load a page
so that it is in its native setting, as it would be seen navigating
through our site, inside an iframe on the site's home page. Here is
the directory structure of the three pages in question:

home/folder1/index.htm
our home page containing all navigational links for the site; also
contains iframe (name=iframe), which holds all content as users
navigate through the site

home/folder1/iframe_main.htm
loads into the iframe by default when index.htm is accessed

home/folder2/news.htm
This is the page I would like to access externally and directly so that
it loads into the iframe on index.htm.

Is there a way to do this with a hyperlink, or do I need Javascript?
[snip]

What you are proposing to do is known as "Stealing bandwidth" which
could result in your account being tossed.

For instance, your site is xyz.com and you want to display a frame page
that is hosted by abc.com.
That puts extra bandwidth usage on them and they could go over their
allotment and when they find out you caused it, you go down the tubes
and wind up paying them.

No, from his explanation this is not what he wants to do. He just wants
to load a different page which would be useless without the other site
around it. And I would say it's on the same server... otherwise it would
be useless to give us the directory structure.
Best to just put a link to the page and open it in a new window.

No. Simply bullshit. Why a new window? To say it in your words: Popups suck!
Some jerk tried to make his visitors see my home page on his site.

I simply put in a line of javasctipt that directed his visitors to an
adult web site.
He got the message.

Uhh... how mean... Why don't you just use the "usual" way and "break"
the frameset by loading your own page in the top frame?
 
J

Jonathan N. Little

richard said:
What you are proposing to do is known as "Stealing bandwidth" which
could result in your account being tossed.

Not at all, what he was describing is the frames shortcoming of not
being able to 'bookmark' or externally call a specific page on his site
except the 'default'
 
G

greencw3

Yes, that is correct. I have no desire to show another site's web
content in my iframe. I only want to be able to externally link to any
page on my own site so that the page loads in my own site's index.htm
iframe with all of the visual and navigation aids showing--as if the
user had gotten to the page by navigating from my home page.

Is there a way around this shortcoming?
 
J

Jonathan N. Little

greencw3 said:
Yes, that is correct. I have no desire to show another site's web
content in my iframe. I only want to be able to externally link to any
page on my own site so that the page loads in my own site's index.htm
iframe with all of the visual and navigation aids showing--as if the
user had gotten to the page by navigating from my home page.

Is there a way around this shortcoming?

Well I previously posted them, but I will reiterate.


#1 Your first and *best* option is to stop using FRAMES|IFRAMES to
insert your common parts like your navigation and use server-side
methods that would allow each page on your site to have a unique URL.
PHP is very commonly available and can be a simple as

<?php include('mymenu.php'); ?>

See: All My FAQs Wiki: Include one file in another
http://allmyfaqs.net/faq.pl?Include_one_file_in_another

Advantage: Everything, it will always work regardless of the browser or
browser settings, transparent to the visitor, separates common parts
of page for easy maintenance, you only have to change the one file to
change your menu, not duplication of markup. Easily upgraded to database
served website which appears to be the trend.

Disadvantage: None really.

#2 Keeping your frames your other options are not so good and I require
fudging, unnecessary complexity, and a maintainability issue. Parsing
and processing a parameter via the URL query string to select the
specific page:

http://www.example.com/index.html?page=aboutus

Then you could use server-side script to load the 'aboutus' page into
the frame.

Advantage: Transparent to the visitor's browse being server-side BUT

Disadvantage: If you have server-side why bother with the IFRAME when
you can do the first option and offer your visitors a static
bookmarkable URL http://www.example.com/aboutus.php rather than a longer
query string: http://www.example.com/index.php?page=aboutus. Without the
IFRAME your inclusion does not have to be relegated the rectangular
IFRAME and your page can have more design flexibility!

#3 Keeping your frames like #2 but using JavaScript to parse the query
string to load desired IFRAME contents.

Advantage: Do not require server-side support *BUT*

Disadvantage: Don't do this because: server-side support is now almost
universally available unlike 10 years ago. This method *will fail
miserably* if JavaScript is not enabled which is becoming an increasing
percentage of your visitors and search engines will not be able to index
your page resulting in few people finding you! And more so just take my
advice, don't do it...
 
G

greencw3

Jonathan,

Thank you for your thoughtful reply. After searching for and failing to
find a "magic bullet" that would solve my iframes issue, I suspected
that dumping the iframe would be the best solution. You have certainly
confirmed that suspicion.

I am a media specialist (translation: a school librarian) who has the
task of updating and advertising, via external links by email, our
school web site. It is these email hyperlinks that led me to post my
original query. The actual creation--and annual re-creation--of the
site is done by a web design teacher and her students, so I am loathe
to make any major design changes to the site.

Consequently, I am hoping to solve this issue without altering the look
of the web site. Each page on the site has the look of a three-framed
page: an decorative image on the left, an image with navigational
hyperlinks on top, and content (now in the iframe) on the rest of the
page. Given the static nature of the top and left images, could I solve
this using a cascading style sheet and link every page on the site to
this CSS? I ask this because I know nothing about PHP and fear screwing
up the site while climbing the learning curve.

Thanks again for your help.
 
J

Jonathan N. Little

greencw3 said:
Jonathan,

Thank you for your thoughtful reply. After searching for and failing to
find a "magic bullet" that would solve my iframes issue, I suspected
that dumping the iframe would be the best solution. You have certainly
confirmed that suspicion.

Yes, frames were an early solution to static, repetitive parts (banners
and navigation) of web pages within a website (early 90's) when
server-side was not readily available. Server-side is a much better and
easier solution.
I am a media specialist (translation: a school librarian) who has the
task of updating and advertising, via external links by email, our
school web site. It is these email hyperlinks that led me to post my
original query. The actual creation--and annual re-creation--of the
site is done by a web design teacher and her students, so I am loathe
to make any major design changes to the site.

PHP is not very hard at all. Many, many online tutorials. The hardest
part in my opinion is that it has so many core functions. Good place to
start...

http://www.php.net/manual/en/
Consequently, I am hoping to solve this issue without altering the look
of the web site. Each page on the site has the look of a three-framed
page: an decorative image on the left, an image with navigational
hyperlinks on top, and content (now in the iframe) on the rest of the
page. Given the static nature of the top and left images, could I solve
this using a cascading style sheet and link every page on the site to
this CSS? I ask this because I know nothing about PHP and fear screwing
up the site while climbing the learning curve.

It can be interspersed within your HTML so conversion can be less
painful! Of course you have not provided a URL to site in question. All
depends on which webserver you are on, if Apache then most likely PHP
will be an option, IIS then ASP will most likely be your server-side
language. Sounds like the site was do for an upgrade anyway!
 
G

greencw3

Jonathan said:
PHP is not very hard at all. Many, many online tutorials. The hardest
part in my opinion is that it has so many core functions. Good place to
start...

http://www.php.net/manual/en/

Thank you. I will give it a look.
It can be interspersed within your HTML so conversion can be less
painful! Of course you have not provided a URL to site in question. All
depends on which webserver you are on, if Apache then most likely PHP
will be an option, IIS then ASP will most likely be your server-side
language. Sounds like the site was do for an upgrade anyway!

Our high school home page is:
http://mlec.dadeschools.net/hs/Home Page/index2.htm

I don't know which webserver we are using. It resides on a local
Windows 2003 server, but is likely to be moved to a remote district
server within the next year or two.

We also have an adult-vocational web site,
http://mlec.dadeschools.net/index2.html,
maintained for years by a brilliant man who no longer works for us. We
have a major upgrade/overhaul ahead of us to integrate the two sites.

Again, many thanks.

Charles Green
 
J

Jonathan N. Little

greencw3 said:
Our high school home page is:
http://mlec.dadeschools.net/hs/Home Page/index2.htm

I don't know which webserver we are using. It resides on a local
Windows 2003 server, but is likely to be moved to a remote district
server within the next year or two.

Response Header is:

Server: Microsoft-IIS/5.0
X-Powered-By: ASP.NET
Date: Sun, 22 Oct 2006 00:38:02 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Fri, 25 Aug 2006 18:49:22 GMT
Etag: "85cdd2e77c8c61:e7a"

So I'd say you're stuck with ASP. I find PHP easier, but unless the move
in the coming year is to a *nix server I'd focus on ASP and not PHP/

We also have an adult-vocational web site,
http://mlec.dadeschools.net/index2.html,
maintained for years by a brilliant man who no longer works for us. We
have a major upgrade/overhaul ahead of us to integrate the two sites.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

Yep this one ancient, time for some modernization. HTML 4.01 + CSS +
server-side for including parts will be much easier to maintain and
change...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top