473,326 Members | 2,102 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,326 software developers and data experts.

checking for frames

For the record, I hate frames. But I am stuck with them for this project.
Just wanted to get that out of the way so that any helpful replies I get
won't include chastisement for using frames.

OK, here's the question. How can I use a server-side script to determine if
the page being loaded is doing so by itself, vs. in a frame? If it is by
itself, I want to put in ASP code to redirect it to the frames-based page.
Sep 26 '05 #1
2 1362
You can't, really. I mean, you can kinda by using
Request.ServerVariables("HTTP_REFERER"), but you'd have to cover a lot of
different circumstances to avoid false positives.

This is most often done with client-side script.
http://www.webreference.com/js/column36/forcing.html

(I personally would do location.replace(url), not location.href=url.)

Ray at home
"middletree" <mi********@verywarmmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
For the record, I hate frames. But I am stuck with them for this project.
Just wanted to get that out of the way so that any helpful replies I get
won't include chastisement for using frames.

OK, here's the question. How can I use a server-side script to determine
if
the page being loaded is doing so by itself, vs. in a frame? If it is by
itself, I want to put in ASP code to redirect it to the frames-based page.

Sep 26 '05 #2
this'll work.
thanks!
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eJ**************@TK2MSFTNGP14.phx.gbl...
You can't, really. I mean, you can kinda by using
Request.ServerVariables("HTTP_REFERER"), but you'd have to cover a lot of
different circumstances to avoid false positives.

This is most often done with client-side script.
http://www.webreference.com/js/column36/forcing.html

(I personally would do location.replace(url), not location.href=url.)

Ray at home
"middletree" <mi********@verywarmmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
For the record, I hate frames. But I am stuck with them for this project. Just wanted to get that out of the way so that any helpful replies I get
won't include chastisement for using frames.

OK, here's the question. How can I use a server-side script to determine
if
the page being loaded is doing so by itself, vs. in a frame? If it is by itself, I want to put in ASP code to redirect it to the frames-based page.


Sep 26 '05 #3

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

Similar topics

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
14
by: Frances Del Rio | last post by:
if (parent.frames.main.location == 'mediaselect.html') { I have a very simple frameset, name of frame where I'm checking is 'main'... why is this not working? I mean this is correct syntax,...
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...
2
by: JPL Verhey | last post by:
(i hope somebody (else) will read and have an idea! Thnx) Hi, With a script in a popup window, I want to check if certain content is present in a page loaded into the frame "main" of the...
2
by: threeflush | last post by:
I have some code that checks to see if a document object exists in a sibling frame before continuing processing like: if (parent.frames.document){ .... } However, sometimes the frame I'm...
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...
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?
7
by: javelin | last post by:
I have inherited a project with some code that runs fine for some frames but not for others. This is a frames based project, and (apparently) sometimes there is a parent frame, and sometimes not....
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....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.