How to prevent a iframed page from opening in a new window - asp.net

I have a site iframed in and it has a bunch of links in the menu. The way their site is built they have all the links in the menu set to open the pages in a new window. Is there any way to override this and have it open in the iframe?
Thanks,
Matt

If you can get around the security issues, I'd suggest looking at jQuery in order to take over the click event for all the links. If your hosted on different domains and don't have control over the local browser your probably out of luck.

Related

unable to View a page on my website but can View it in preview through Wordpress

in the hamburger menu of our website, i created a Yoga Video Course Page via wordpress and it was working fine. I looked this morning and can see it in Wordpress and can even edit it and see it on the preview. However when i try to view it on our website th screen appears Black.
Any suggestions would be grateful?
Thank you
Please try to open the inspect element and look if the elements are displayed as required. The issue might be due to several reasons. You need to investigate further and find a solution. Also look at the network tab on inspect element to make sure there are not 500 internal server errors. Also set the wp_debug=true on config.php to provide more error info. Also try to activate another theme and see if the page is being rendered properly.

web pages stop rendering after iFrame loads

We have a web page in our solution that uses an iFrame to display a vendor's web page. Usually when a user navigates away from this page that hosts the iFrame, all the other pages render just fine. The vendor just redesigned the content of their page, however, and while their new page looks fine in the iFrame and that hosting page works fine too, any time a user navigates away from the hosting page, the page being redirected ~to~ does not render properly. It's just completely blank. An f5 will get it back, but I'm wondering what I can do to fix this. The vendor says it's not their problem, but that's the only thing that changed. I've tried both redirecting the iFrame to blank and removing it outright via javascript (see below), and while I can see the iFrame disappear just before the redirect, the redirected to page still will not render without hitting f5.
window.onbeforeunload = function ()
{
document.getElementById('<%= ifr.ClientID %>').src = "about:blank"
$("#<%= ifr.ClientID %>").remove();
}
Can anyone give a suggestion of why this is happening and how to prevent it?
TIA
-VG
I've had a similar problem when using an iFrame containing a page from our payment card processor embedded in our eCommerce pages. I couldn't see anything in the source of the iFrame that might be causing the problem, so I opened up space for the iFrame, contained it in a div (my last element on the page) and used position to render the iFrame in the position I wanted it. Hardly responsive design, but it worked!
For anyone coming to this from the first Google result, this can be caused by your iframe being self-closed (ending with />). To fix it you just need to close the iframe with </iframe> instead. This may not be the original problem but it worked for me.

issue opening thickbox from inside an existing iframe

So I seem to have found myself in a bit of pickle. In order to keep a header flash element from reloading every time someone goes to a different page, I encapsulated all my site's content in an iframe. Unfortunately, some of the iframe's include thickbox, which opens an iframe of it's own. The iframe that thickbox opens, requires it be opened on the topmost page, so that the fixed attribute allows the iframe to remain static in the viewport. Because we're already nested into an iframe, this isn't possible.
This is the most promising lead I have so far:
http://blog.codepyro.com/2010/01/thickbox-inside-of-thickbox-iframe.html
Unfortunately, that only replaces the iframe that the thickbox is being opened from, with the content of the thickbox.
I also just came across this, but I'm not sure how I would go about retooling it to suit my needs:
open iframe fancybox from within an iframe so that it opens in the parent
Here is a link to what I'm working on:
http://www.lalalandmusicfestival.com/site/
The problem area is on the Talent page.
I think if there was a way to force the link to target the "top" or "parent" page with javascript, it may be possible, but I haven't found anything that's been of any use to me yet.
Thanks in advance for your help!

adsense loads in the wrong iframe

I´m having a big big problem with adsense, no matter what I do the adsense result iframe is loading inside other iframe. I´m using WordPress + Bootstrap Framework.
This particular site has two different ads, first use an adserver service which give me his own script, this script is placed in the header.php inside of a <div id="top-space"> and the adserver handle with the script to show an <iframe> and inside that iframe the objet flash of the banner.
The adsense code is in the sidebar and to place it I use a text wodget, put the code there and that´s it.
In 60% of the times the site loads in the correct position each banners, the adserver banners are in the top and adsense ads in the sidebar.
BUT! randomly the adsense iframe is loading inside of the adserver iframe. I tried to use this solution but don´t work at all.
I´m desesperate because my client is loosing money, the site don´t show the right ads, and some times adsense iframe push adserver ads so the site looks crappy.
Even I try to use adrotate wordpress plugin thinking that help me avoid this bug, but nothing.
This sounds like it could be a caching problem. I've noticed in the past, iframes usually don't refresh unless you specifically right-click and refresh each individual one. If you're running any WordPress caching, clear that, then your browser cache, or try an incognito window.

Protect Iframe From Openining In New Window Or Tab

I am adding framed content to a wordpress blog in a membership area. Is there a way that I can prevent that content from being opened in a new window or tab? A plugin or a string of code I can add?
As it is now if someone right clicks on the frames content they can view it in a new window and possibly share that URL rendering the membership site useless in controlling who views....
I would like a block.... If possible...I see other iframes popup an error message when you try and view....
Any help is appreciated!
Thank you for a great place for info
One possible solution I can think of is now to add JavaScript code to prevent right click, but again this is not always going to work because the person can simply disable JavaScript and they can still right click to see the content of the iframe. Not only that there is alway a way to sniff the URL of the iframe by either using some sort of software or even using something like FireBug.

Resources