Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8680155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:10:27+00:00 2026-06-12T21:10:27+00:00

I am using a Classic ASP file (language = JavaScript) to display some HTML

  • 0

I am using a Classic ASP file (language = JavaScript) to display some HTML information. What I want to do is check if the page is in a frame, and if not, redirect to another page. Is there a way of checking if a page has a parent in Classic ASP? I’ve tried using window, but it isn’t recognised. The code should be something like this:

<%@ language = "JavaScript"%>
<!DOCTYPE html>

<html>

    <head>
        <meta http-equiv="content-type" content="text/html;charset=utf-8" />
        <title>Secure Area</title>

        <link href="css/basic.css" rel="stylesheet" type="text/css" media="all" />

        <%
            if (!window.parent)
                window.location.replace("index.html");
        %>

        <link href="Images/FavIcon.ico" rel="shortcut icon" type="image/x-icon" />
    </head>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:10:28+00:00Added an answer on June 12, 2026 at 9:10 pm

    Not really.

    Browsers do not send information about frame structure to the server when they request a resource.

    You could check the HTTP Referer header (it is optional so it might not be defined), make an HTTP request (using your server side code) back to that URI, then parse it to see if it contains any frames, and if any of them default to src="your uri" or if any links targetting a frame have href="your uri" … but that would be very inefficient and unreliable.

    This sort of thing is better handled with client side JS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a classic ASP page that calls in some other ASP files using
Hi I have a webpage that's using classic ASP that I want to display
I'm using classic ASP in my project. I want to merge two XMLs together.
I am fixing a defect in some classic ASP using VBScript and I've come
We're still using old Classic ASP and want to log whenever a user does
Setup: IIS7 serving ASP classic VB script code which generates a dynamic VSC page/file
I'm using ImageMagickObject COM+ in Classic ASP. I am trying to convert an SVG-file
I'm using the ASP Classic ReadLine() function of the File System Object. All has
I am in need of using classic ASP to create an XML file from
I am trying top open an xlsx file using classic ASP and ADO The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.