473,396 Members | 1,766 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,396 software developers and data experts.

Require Frameset

I have some pages that open in a frameset. I want them to be opened *only*
in the frameset (and not on their own). How can I disallow a page from being
opened on its own (i.e., allow to be opened only when from within frameset)?

Thanks!

-G
Nov 18 '05 #1
2 1407
you will have to resort to javascript for this. asp.net doesnt have the
concept of frames and the page has no information on whether it is loaded in
a frame or on a normal window (either way a frame is just a window)
if (parent.frames.length = 0) {
parent.location.href = "your_frameset.aspx or html page"
}
--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:eq*************@TK2MSFTNGP11.phx.gbl...
I have some pages that open in a frameset. I want them to be opened *only*
in the frameset (and not on their own). How can I disallow a page from being opened on its own (i.e., allow to be opened only when from within frameset)?
Thanks!

-G

Nov 18 '05 #2
Have your page make sure that it's within a frameset. If it's not, it can
redirect to the frameset page.
MSDN's site does this pretty well.
From looking at their source code they do it with client side javascript
code:
if (self == top) ...

View the code yourself:
http://msdn.microsoft.com/library/default.asp
(right click in the bottom right frame and do a view source.)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:eq*************@TK2MSFTNGP11.phx.gbl...
I have some pages that open in a frameset. I want them to be opened *only*
in the frameset (and not on their own). How can I disallow a page from
being
opened on its own (i.e., allow to be opened only when from within
frameset)?

Thanks!

-G

Nov 18 '05 #3

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

Similar topics

8
by: Hans | last post by:
Hi There, I have a page that has links with some variables and I need to open the results set in a frameset. I have tried doing this in various different ways, but still cannot get the variable...
2
by: luu duong | last post by:
I know this is probably easy but here is the details. I have an asp page that is not inside a frameset. I want to post data to another asp page that is inside a frameset. So firstpage.asp has...
1
by: JP | last post by:
Hi, How can I create a dynamic frameset whose content changes based on user inputs? Specifically, how do I toggle a frame within a frameset? How can I allow a user to "close" or "dock" a...
1
by: Ian | last post by:
Here's an interesting delema. I have two on-line manuals built with frames. Each has a unique frameset. Some of the pages have related material and are linked. Is there a way to have a page...
0
by: Charles A. Lackman | last post by:
Hello, I have a frameset nested inside another frameset: <FRAMESET border="0" frameSpacing="0" rows="150,72%" frameBorder="No"> <FRAME name="header" marginWidth="0" marginHeight="0"...
3
by: mark4asp | last post by:
According to this <http://css-discuss.incutio.com/?page=BoxModelHack> IE6 will display differently to the W3C standard. Only IE6/strict and I suppose IE 7 display correctly. IE 6 transitional and...
0
by: joeller | last post by:
On October 13, 2006 Mark Rae wrote Hi, Firstly, I have not the slightest intention of using framesets - the reason for this post is merely to ask for assistance in furthering my understanding of...
3
by: Geoff Cox | last post by:
hello I am trying out <?php require("fred.htm"); ?> and this works fine but when I use <?php require("frames.htm"); ?>
4
by: maminx | last post by:
Hello..i have problem, hope someone can help me..i have this frameset below : <FRAMESET ROWS="55%" COLS="37%,63%"> <FRAME NAME="runningTrade" SRC="http://runningtrade.com" scrolling="no"> ...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.