checking for frames

M

middletree

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.
 
R

Ray Costanzo [MVP]

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
 

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

Similar Threads

Looping for checking input integer 2
ASP.NET Forms + Frames 1
question about frames and xhtml 8
frames? 2
Replacement for Frames? 1
I'm constrained to retain frames... 3
Missing stack frames? 0
ASP in Frames 4

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top