Solved

Macintosh Internet Explorer Frame Buster

Posted on 2004-09-01
3
199 Views
Last Modified: 2006-11-17
All,
  Apparently the following code does not work on a Macintosh in Internet Explorer:
if (document.images){
      top.location.replace('[page]');
      }else{
      top.location.href = '[page]';
      }

  What's the appropriate correction to get this to work on a Mac?
Thank you,
--Will
0
Comment
Question by:will_rein99
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
ziffgone earned 500 total points
Comment Utility
Try this one:

<script language="Javascript">
<!--
if (top.location != self.location)
  {
    top.location = self.location.href
  }
//-->
</script>

Hope that helps, but I'm not too familiar with Mac IE.

Regards...
0
 

Author Comment

by:will_rein99
Comment Utility
The actual solution was as follows:

<script language="javascript">
if (document.images){
      top.location = ('[page]');
      }else{
      top.location.href = '[page]';
      }
</script>

Apparently the Mac version did not like the "replace" method.  Go figure.
You get the points Ziff for giving me the key clue in your code.  Thank you much!
--Will
0
 
LVL 14

Expert Comment

by:ziffgone
Comment Utility
No problem Will.

Regards...
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now