• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 157
  • Last Modified:

SCRIPT Frames ?

Is it possible to make a script, that can find out if the browser is browsing FRAMED pages or not ??
0
win32
Asked:
win32
  • 2
1 Solution
 
HolySpiritCommented:
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
 
HolySpiritCommented:
win32,
P.S. the function will return true if the current document is framed, false if the document is un-framed ...
-- Holy Spirit
0
 
win32Author Commented:
Year I can see your point, and how the program works ! Thanks !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now