473,388 Members | 963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

frames

Hi,

My website uses frames and one should always load the frameset and not
only one of the frames. Is there a nice way to ensure/check that a page is
actualy loaded within a frameset?

thanks,

David
Jul 16 '05 #1
19 6457
David de Kloet wrote:
Hi,

My website uses frames and one should always load the frameset and not
only one of the frames. Is there a nice way to ensure/check that a
page is actualy loaded within a frameset?


Well, if you must use frames...

Putting the following in the head of your pages will mean that, in the event
of a frame being loaded without the frameset, the page will default to
index.html. Whilst this doesn't give the visitor the framed page that they
were expecting, it does give them a complete frameset with a menu so that
they can at least navigate the site.

<script language="javascript">
if (document.location == top.location)
{
document.location="index.html";
}
</script>

I'd also suggest that there are lots of ways of getting rid of frames - the
"I want to have the same menu on every page without repeating it" is the
benefit that I hear most often and that's easily solved with includes:
http://www.bignosebird.com/sdocs/include.shtml

HTH
--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

Jul 16 '05 #2
On Tue, 8 Jul 2003, PeterMcC wrote:
Well, if you must use frames...
I know what you mean.
<script language="javascript">
if (document.location == top.location)
{
document.location="index.html";
}
</script>
Thanks, just what I was looking for.
I'd also suggest that there are lots of ways of getting rid of frames - the
"I want to have the same menu on every page without repeating it" is the
benefit that I hear most often and that's easily solved with includes:
http://www.bignosebird.com/sdocs/include.shtml


I'm aware that you should reconsider the moment you want to you frames but
I think frames serve a purpous on my site so I'll just keep my frames.
David
Jul 16 '05 #3
On Tue, 08 Jul 2003 11:52:50 +0200, David de Kloet wrote:
Hi,

My website uses frames and one should always load the frameset and not
only one of the frames. Is there a nice way to ensure/check that a page is
actualy loaded within a frameset?

thanks,

David


Yes. Never, *ever*, use frames.

problem solved.
--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Johns Hopkins University | Baltimore, MD
Website | http://www.wse.jhu.edu/newtnotes/

Jul 16 '05 #4
> > My website uses frames and one should always load the frameset and not
only one of the frames. Is there a nice way to ensure/check that a page is actualy loaded within a frameset?


Yes. Never, *ever*, use frames.

problem solved.


That's silly. There are several places when using frames is a good idea.
One example that comes to mind is firmware for a router or somesuch that has
a web interface. No PHP or ASP server can be run there, so frames provide a
good way to show a menu on all pages.

If they were pointless, then W3C would have depreciated them long ago.
Jul 16 '05 #5
On Tue, 08 Jul 2003 16:28:33 +0100, Marc wrote:
> My website uses frames and one should always load the frameset and not
> only one of the frames. Is there a nice way to ensure/check that a
> page is > actualy loaded within a frameset?


Yes. Never, *ever*, use frames.

problem solved.


That's silly. There are several places when using frames is a good idea.
One example that comes to mind is firmware for a router or somesuch that
has a web interface. No PHP or ASP server can be run there, so frames
provide a good way to show a menu on all pages.

If they were pointless, then W3C would have depreciated them long ago.


Yes, but he is not developing firmware for a router, is he?

As far a 94.8% of website devlopment goes, frames are a bad idea. This
means, for all intents and purposes, *never* use frames.

Allright, allright, I get your point. Okay, I amend my statement.

Only use frames if you *really* *really* *really* know what you are doing,
or are developing firmware for a router.

later...
--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Johns Hopkins University | Baltimore, MD
Website | http://www.wse.jhu.edu/newtnotes/

Jul 16 '05 #6
"Marc" <me@privacy.net> wrote:
That's silly. There are several places when using frames is a good idea.
One example that comes to mind is firmware for a router or somesuch that has
a web interface. No PHP or ASP server can be run there, so frames provide a
good way to show a menu on all pages.
1. Why do you need to show a menu on all pages? Isn't a link back to a
dedicated menu page as good if not better?
2. Even if you need to show a menu on all pages why does it need to be
in a frame and not part of the real page?
If they were pointless, then W3C would have depreciated them long ago.


ITYM deprecated (no 'i'). And is 1997 long enough ago for you? Frames
were deprecated as soon as they were standardised.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 16 '05 #7
On Tue, 8 Jul 2003, Jeffrey Silverman wrote:
On Tue, 08 Jul 2003 16:28:33 +0100, Marc wrote:
Yes. Never, *ever*, use frames.

problem solved.
That's silly. There are several places when using frames is a good idea.
One example that comes to mind is firmware for a router or somesuch that
has a web interface. No PHP or ASP server can be run there, so frames
provide a good way to show a menu on all pages.

If they were pointless, then W3C would have depreciated them long ago.


Yes, but he is not developing firmware for a router, is he?


No I'm not. I have two frames, left and right. At the left you can search
a database and get results. If you click on a search result at the left,
the frame at the right displays details about the chosen result.

If you know "Magic: the Gathering" you can try it at:
http://www.cs.vu.nl/~dskloet/magic

How would you replace these frames?

As far a 94.8% of website devlopment goes, frames are a bad idea. This
means, for all intents and purposes, *never* use frames.

Allright, allright, I get your point. Okay, I amend my statement.

Only use frames if you *really* *really* *really* know what you are doing,
or are developing firmware for a router.

later...

David
Jul 16 '05 #8
PeterMcC wrote:
Putting the following in the head of your pages will mean that, in the
event of a frame being loaded without the frameset, the page will default
to index.html. Whilst this doesn't give the visitor the framed page that
they were expecting, it does give them a complete frameset with a menu so
that they can at least navigate the site.


Example of what happens when you use this method. (Real example)

A user (lets call him 'David Dorward') searches Google for information.
David finds a site with the information.
David clicks the link and waits for page to load.
David looks for the information.
He can't find it.
After a while he goes back to google and looks for a different side with the
information on it.

(Then becuase he can't find any other site (unusual) he disables JS, goes
back to the site, and notices that it looks entirely different to the way
it looked last time - becuase without JS he didn't get redirected to the
homepage).
--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead
Jul 16 '05 #9
Marc wrote:
Yes. Never, *ever*, use frames.

problem solved.


That's silly. There are several places when using frames is a good idea.


As a cheap-man's server side include a good idea it isn't.
--
Iso.
FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
Recommended Hosting: http://www.affordablehost.com/
Web Standards: http://www.webstandards.org/
Jul 16 '05 #10
Paul Liversidge wrote:
There is an alternative to this. There is a product called Framejammer
that is a Dreamweaver extension. It's a little bit of JavaScript that
sits in every page. When a framed page is requested, it realises that
it's frameset isn't present, loads the frameset and loads the page.
It's a bit like how MSDN works.


(a) Only works when JS is available
(b) You still need a frameset document for every combination of pages.

--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead
Jul 16 '05 #11
> >That's silly. There are several places when using frames is a good idea.
One example that comes to mind is firmware for a router or somesuch that hasa web interface. No PHP or ASP server can be run there, so frames provide agood way to show a menu on all pages.
1. Why do you need to show a menu on all pages? Isn't a link back to a
dedicated menu page as good if not better?


Fair point.
2. Even if you need to show a menu on all pages why does it need to be
in a frame and not part of the real page?


This is a problem becuase the device has a very limited space allowance, and
thus anything to reduce file size is a must.
If they were pointless, then W3C would have depreciated them long ago.


ITYM deprecated (no 'i'). And is 1997 long enough ago for you? Frames
were deprecated as soon as they were standardised.


What is ITYM?
Jul 16 '05 #12
> >> Yes. Never, *ever*, use frames.

problem solved.
That's silly. There are several places when using frames is a good

idea.
As a cheap-man's server side include a good idea it isn't.


OK, maybe 'a good idea' should have been 'nearly the only option'.
Jul 16 '05 #13
Jeffrey Silverman wrote:
On Tue, 08 Jul 2003 11:52:50 +0200, David de Kloet wrote:

Hi,

My website uses frames and one should always load the frameset and not
only one of the frames. Is there a nice way to ensure/check that a page is
actualy loaded within a frameset?
Yes. Never, *ever*, use frames.


Why not? Sometimes they're really useful. Do you always use Windows
Explorer with the folder list turned off?

I would correct your statement above to:
Use frames only if there is a significant benefit in using them.

....but of course frames/no frames is a religious argument so there will
be no consensus.

Jul 16 '05 #14
In article <Pi*******************************@keg.cs.vu.nl> ,
ds*****@cs.vu.nl says...
On Tue, 8 Jul 2003, Jeffrey Silverman wrote:
On Tue, 08 Jul 2003 16:28:33 +0100, Marc wrote:
> Yes. Never, *ever*, use frames.
>
> problem solved.

That's silly. There are several places when using frames is a good idea.
One example that comes to mind is firmware for a router or somesuch that
has a web interface. No PHP or ASP server can be run there, so frames
provide a good way to show a menu on all pages.

If they were pointless, then W3C would have depreciated them long ago.


Yes, but he is not developing firmware for a router, is he?


No I'm not. I have two frames, left and right. At the left you can search
a database and get results. If you click on a search result at the left,
the frame at the right displays details about the chosen result.

If you know "Magic: the Gathering" you can try it at:
http://www.cs.vu.nl/~dskloet/magic

How would you replace these frames?


Didn't look at the referenced URL but...

ASCII ART WARNING - USE FIXED FONT

HEADER PART shows whatever blah blah blah

menu1 | main page
menu2 | main page
menu3 | main page
menu4 | main page
This page sponsored by blah wibble etc

Where you use a prepend/append pair of pages to create the header and menu
(prepend) and append to do the 'This page...' and the main part of the
page is the 'current script'

For an example see http://auseinet.flinders.edu.au

--
Quod subigo farinam

$email =~ s/oz$/au/o;

Jul 16 '05 #15
On Wed, 9 Jul 2003, David Robley wrote:

<snip>
Yes, but he is not developing firmware for a router, is he?


No I'm not. I have two frames, left and right. At the left you can search
a database and get results. If you click on a search result at the left,
the frame at the right displays details about the chosen result.

If you know "Magic: the Gathering" you can try it at:
http://www.cs.vu.nl/~dskloet/magic

How would you replace these frames?


Didn't look at the referenced URL but...


And you didn't read my post either. I don't have a menu and I wouldn't use
frames to implement one.

<about a menu>

David
Jul 16 '05 #16
In article <Pi*******************************@keg.cs.vu.nl> ,
ds*****@cs.vu.nl says...
On Wed, 9 Jul 2003, David Robley wrote:

<snip>
> Yes, but he is not developing firmware for a router, is he?

No I'm not. I have two frames, left and right. At the left you can search
a database and get results. If you click on a search result at the left,
the frame at the right displays details about the chosen result.

If you know "Magic: the Gathering" you can try it at:
http://www.cs.vu.nl/~dskloet/magic

How would you replace these frames?


Didn't look at the referenced URL but...


And you didn't read my post either. I don't have a menu and I wouldn't use
frames to implement one.

<about a menu>

David


I don't believe I suggested frames. I do believe that my suggestion could
be adapted to a list of options on the left and results on the right,
rather than a menu; in any case avoiding the use of frames. Of course if
the use of frames is a necessity then my suggestion is of no use.

--
Quod subigo farinam

$email =~ s/oz$/au/o;

Jul 16 '05 #17
On Fri, 11 Jul 2003, David Robley wrote:
I don't believe I suggested frames. I do believe that my suggestion could
be adapted to a list of options on the left and results on the right,
rather than a menu; in any case avoiding the use of frames. Of course if
the use of frames is a necessity then my suggestion is of no use.


The problem is that the list of options requires a database query to be
created which can take a few seconds. I don't like the idea of recreating
the whole list each time one of the options is selected.

David
Jul 16 '05 #18
> > I don't believe I suggested frames. I do believe that my suggestion
could
be adapted to a list of options on the left and results on the right,
rather than a menu; in any case avoiding the use of frames. Of course if
the use of frames is a necessity then my suggestion is of no use.


The problem is that the list of options requires a database query to be
created which can take a few seconds. I don't like the idea of recreating
the whole list each time one of the options is selected.


Looking at your page, I don't see why you need the contents of both frames
displayed at once.

Why not just add a link to the page currently in the left frame which opens
the page currently in the right frame?
Jul 16 '05 #19
On Fri, 11 Jul 2003, Marc wrote:
I don't believe I suggested frames. I do believe that my suggestion could be adapted to a list of options on the left and results on the right,
rather than a menu; in any case avoiding the use of frames. Of course if
the use of frames is a necessity then my suggestion is of no use.


The problem is that the list of options requires a database query to be
created which can take a few seconds. I don't like the idea of recreating
the whole list each time one of the options is selected.


Looking at your page, I don't see why you need the contents of both frames
displayed at once.

Why not just add a link to the page currently in the left frame which opens
the page currently in the right frame?


I find it usefull to have both pages in front of me but you're right it's
not a necessity.

But this brings me to another quiestion:
If I would do as you suggest, you would do 'back' each time you want to
open another one of the found results. But if I do 'back' my browser
(Mozilla) says the POSTDATA has expired so he has to post it again
(instead of getting te page from cache). Can you tell me how I keep the
postdata from expiring?

David
Jul 16 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: les | last post by:
Hello, I just wonder what are the implications to use frames to build portal. I've seen some sites that are quite fast with frames but I just wonder if there are hidden "costs". I've tried to...
40
by: JohnnyCJohnny | last post by:
Is it pretty safe to say that almost all web surfers now use browsers that are Frames compatible? What are most people using these days? IE? Thanks
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
95
by: Neal | last post by:
Of course, every frame site I've ever seen has reduced usability and all. We've been through this before. But as frameset is still a part of HTML, there must be some legitimate use for it, hmm?...
25
by: Steal | last post by:
Hi at all I try to validate this page using the link: http://validator.w3.org/ but it return that this is not a valid HTML 4.01 page please where is it error? Steil <!DOCTYPE HTML PUBLIC...
5
by: Dfenestr8 | last post by:
Hi. I'm designing a site, and I'm trying find a way of browsing it without using frames, so I can test the <noframes> </noframes> tags. I use a linux mandrake 10 system, with KDE 3.2. Is there...
7
by: dj Bass | last post by:
simple, they don't like things that restrict the server-side controls... and when it comes to frames, you need client side stuff and that stuff's up the asp.net strategy. right or wrong?
3
by: Nish | last post by:
Is HTML frame is an old technology? Will the modern web application are developed using the HTML frames? Does all the browsers support them? Thank you for your suggestion, Nish
56
by: Deepan HTML | last post by:
Hi All, Currently i am working in a framed environment where i have divided the window as 20% and 80% and the 20% is used for navigation purpose and right frame for displaying the orignal content....
14
by: Mark | last post by:
Hi Guys, I am very new to ASP.NET world. I need to create three frames. One at the top, one on the left and another on the right side. I don't know how to do it. So please help me with it. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.