Solved

SCRIPT Frames ?

Posted on 2000-03-24
3
145 Views
Last Modified: 2010-04-09
Is it possible to make a script, that can find out if the browser is browsing FRAMED pages or not ??
0
Comment
Question by:win32
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
HolySpirit earned 10 total points
ID: 2655990
win32,
The following script will check if the current document is framed by another document or not >


<script language = JavaScript>
function checkPageFramed()
{
      if (top.location != document.location)
            return true;
      else
            return false;
}
</script>

<< A pretty short script >>

-- Holy Spirit
0
 
LVL 2

Expert Comment

by:HolySpirit
ID: 2655991
win32,
P.S. the function will return true if the current document is framed, false if the document is un-framed ...
-- Holy Spirit
0
 

Author Comment

by:win32
ID: 2657822
Year I can see your point, and how the program works ! Thanks !
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question