The basics: I have a webpage where a user can click on the iframe to view the picture of car,as soon as i click on the iframe the parent page get refresh but the URL doesn't change..nevertheless it seems only chrome browser is affected..have check same scenario in other browser but its working fine
We need to see the code to say what you have done with the iframe.But here is a similar question and see if you are experiencing the same problem with the code.
Clicking an anchor inside an iFrame behaves differently in Firefox and Chrome
Related
I dont know if this is a bug that was introduced on latest version of chrome because it does not happen on any older version of chrome nor on any version of Firefox. Maybe it's a feature or a bug, but I still need a way to fix it but after trying from 2 hours, no luck.
The problem: I have a page with a button and an iframe inside. When I click the button I change the iframe SRC. It works fine. However, if after clicking the button I click the BACK button of chrome browser, it makes the iframe reload the SRC that was assigned.
When I click the BACK button of chrome, it should not mess with iframe history. This problem just started happening now, only on latest version of chrome.
Any way I can fix this using the history object, I mean, preventing iframe navigation to affect the top window history?
I am facing some wired problem while using Ext.Msg.alert() in Iframes in IE,
(I am working on .Net and Ext js 4.1)
my scenario is, I have one parent iframe which contains a window with two buttons start and cancel
on click of start button two process initiated.
first creates new iframe and shows some information
second creates a hidden iframe and download csv file with Ext.Msg.alert() "successfully downloaded" on parent frame
now when I toggle to parent frame I can see Ext.Msg.alert() "successfully downloaded" at the center of page in chrome like this.
but in case of IE it appears at top left of the page with no buttons on alert box
like this
Is there any way to make it work in IE
I have a script that writes an iFrame which loads a page. I created a JSFiddle to make things clear:
link JSFiddle loading CNN in a frame
This loads CNN in a frame. If you scroll down in the frame to the news and click on the new articles and then 'back' there is some strange behavior in both Safari and Google Chrome: clicking 'back' doesn't take the iframe 'back', it takes the entire parent frame 'back'. How can I prevent this from happening?
Also strange is that fact that this doesn't always happen. Try it out for yourself, click at least 5-10 links and you'll see that the fiddle will reset itself every now and then. And that shouldn't happen...
This is behavior that only seems to happen in Safari en Chrome, Opera and IE don't seem to have this problem...
Browser registers history events when you click different URLS, since iframe is part of the page u are on it will register the click inside the iframe as a history event of the parent page. Different browsers may have slightly diferent behavior - I expect FF and Chrome be one way and IE behave slightly different. However testing your example both Chrome and IE worked exactly the same and pretty much as expected.
So to clarify:
Loading JSFiddle is a historical event as far as browser is concerned.
Clicking the button to create and load an Iframe is NOT a historical event.
Clicking a URL link within the Iframe window is a historical event.
At this point u have 2 states that the browser remembers and you can go back and forth in history between them.
I got an iframe on my page, and a menu that the user can select from to see the gallery he wants inside the iframe.
The gallery in the iframe have the abilty to be controled by the keyboard.
My problem is that I want to change the focus to the iframe so the gallery can be control, immediately afther the user choose the gallery.
I tried a few things and every code worked on Firefox without any problem, but with Chrome, and IE nothing really worked, in IE, and Chrome I have to manually press on the iframe to be able to control it.
(I'm pretty new in JavaScript and I'm using jQuery)
This code I toke from another thread for IE problem and its still didn't work (its only workin in Firefox).
$("#LinkTest li a").focusin(function () {
setTimeout(function () {
$('#iframeBoxID').focus();
}, 100);
});
Any ideas?
I think this might solve your problem, by focusing on the content window instead of the iframe element.
$('#iframeBoxID').get(0).contentWindow.focus();
In CRM2011 I have an IFrame that displays a custom ASPX page (a photo gallery). From that page when they click a photo, a new popup should appear with the photo in real size.
What do I have to do to make this work? I tried several methods, none of them are working. It works fine when I'm opening the page in a browser! When I click on a photo, the real sized photo opens in a new screen.
My methods with javascript are :
click => When I use that method, it opens a new window with the complete page that is shown in the IFrame. If the iframe is "http://myPage.aspx", it will open a new window with "http://myPage.aspx" instead of the photo....
<span onclick="window.open(....)">click</span> => Nothing Happens
click => Same happens like method 1
I've tried many other things, but none of them had the wanted effect...
Kind Regards,
Frederic
Thx for your reply.. But unfortunately, it doesn't work. It still opens the same page in a new browser while clicking on it in an IFrame, instead of a popup.
It even gives me a weird behavior when I click on it opened in a normal browser. It opens an popup, but it also opens a second screen with the page itself.
So I still haven't found a way to open it correctly from an IFrame.
Kind Regards,
Frederic
My problem is solved... Somebody has activated the "Restrict cross scripting" on the iframe on the CRM. It works like a charm now, when i deactivate that option!
Thx for the help!
I would change this code:
click
So that it has a target and the script is identified as JS:
click