[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to stop iframe braker

Posted on 2011-10-13
10
Medium Priority
?
298 Views
Last Modified: 2012-05-12
Hi,

I want to use iframe to include other htmls from outside. But there are iframe breakers in those htmls.

How can I possible to stop the breaker script?

This link approves no help! http://www.steadyhealth.com/Web_Hosting_Anti_Frame_Breaker_solution_t53346.html

Thanks
0
Comment
Question by:wsyy
  • 6
  • 4
10 Comments
 
LVL 10

Accepted Solution

by:
Gregg earned 500 total points
ID: 36963778
You cannot override the functionality of another website. So i would guess its not possible. Hope this helps you.
0
 

Author Comment

by:wsyy
ID: 36964166
If that is not possible, is it possible to put my program at the bottom of the browser as a banner ads?
0
 

Author Comment

by:wsyy
ID: 36964179
or is there something like the iframe that i can put something around the website that I was supposed to load into the iframe?
0
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!

 
LVL 10

Expert Comment

by:Gregg
ID: 36964599
I am sorry wsyy, after reading that turtorial and testing - it works for me. I had no idea...

Can you look at the html files, test them and see if this works for you? iframcontent.html parentFrame.html
0
 

Author Comment

by:wsyy
ID: 36969970
No, the script doesn't.

I am using Chrome. What did you use?
0
 
LVL 10

Expert Comment

by:Gregg
ID: 36971847
IE8 and FF
0
 
LVL 10

Expert Comment

by:Gregg
ID: 36971850
I tested by putting parentframe on my local machine. And iframecontent page on web server to test as if separate servers.
0
 

Author Comment

by:wsyy
ID: 36972262
on my side, Chrome doesn't work. Also heard that IE8 won't work either. Just wonder why it works in your case.

could you please to try this script and replace the old one with this on ur side? this script seems more powerful to break the inframe. sucks!

function(){

    if (window.top !== window.self){

        var ROOT_HOST = "iframecontent.html";

        try {

            var host = window.top.location.host;

            if(ROOT_HOST === host) return;

        } catch(e) { }



        setTimeout(function(){

            window.top.location = window.self.location;

            document.body.innerHTML = '';

        }, 0);

        window.self.onload=function(){

            document.body.innerHTML = '';

        };

    }

}
0
 
LVL 10

Expert Comment

by:Gregg
ID: 36989573
Perhaps it doesnt...

Maybe the iframe script was wrong. I didnt think to check firebug for errors. Maybe i should have stuck with gut feeling - it doesnt work.

After looking at that post, i gave a try. I cant recall ever working with iframe so i apologize for my ignorance.
0
 
LVL 10

Expert Comment

by:Gregg
ID: 36989831
Im sorry i was not more helpful. Thank you!
0

Featured Post

Technology Partners: 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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

829 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