checking for frames

Discussion in 'ASP General' started by middletree, Sep 26, 2005.

  1. middletree

    middletree Guest

    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.
    middletree, Sep 26, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:%...
    > 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.
    >
    >
    Ray Costanzo [MVP], Sep 27, 2005
    #2
    1. Advertising

  3. middletree

    middletree Guest

    this'll work.


    thanks!


    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:...
    > 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" <> wrote in message
    > news:%...
    > > 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.
    > >
    > >

    >
    >
    middletree, Sep 27, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Powerslave2112

    From Frames to no frames?

    Powerslave2112, Jan 20, 2004, in forum: HTML
    Replies:
    2
    Views:
    579
    brucie
    Jan 20, 2004
  2. Philip
    Replies:
    3
    Views:
    957
    Karl Groves
    Jun 28, 2004
  3. Ale

    Frames or not Frames...

    Ale, Aug 3, 2005, in forum: HTML
    Replies:
    17
    Views:
    952
    Adrienne
    Aug 5, 2005
  4. Replies:
    1
    Views:
    993
    dorayme
    Feb 10, 2006
  5. Replies:
    0
    Views:
    1,198
Loading...

Share This Page