Solved

Macintosh Internet Explorer Frame Buster

Posted on 2004-09-01
3
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
ziffgone earned 500 total points
ID: 11958903
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
ID: 11960008
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
ID: 11963342
No problem Will.

Regards...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

739 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