I have iframe and i have custom javascript for content of iframe. when iframe loaded for first time my custom javascript has no effect but when i right click on iframe and click reload this frame it loading my javascript and working fine.
can any one tell me how can my javascript works at first time.
iframe src is not from same domain.
Related
I need to debug Javascript to check which function is called on a specific behavior.
To be more specific, when we click inside an iframe, all the page or at least the iframe is reloaded, so loaded 2 times.
For example, if you take a look at this page:
https://artetcadres.fr/art-et-images/#collection/hopper/
and click on the artist "Klimt", the main page activate a javascript function, display this image on the entire page and reload the iframe content.
I tried with the Chrome Devtools but can't figure out which function is called display the image "Loading..." and reload the iframe.
It's reloaded maybe because the url is dynamically updated. The anchor #collection/hopper/ will become #collection/klimt/.
This strange behavior appeared after an wordpress upgrade.
I want to click on a link inside iframe onload with the help of JavaScript, I have a site loading inside an iframe, now I want to click a link of a particular div (ID) on page load. The link is inside the iframe.
Actually I'm trying to change the language of the website which is loading in the iframe, the site has gtranslate plugin installed and has different language flag at the footer of the site.
Basically is it possible to force a page to be translated when the page loads?
The Same Origin Policy prevents you from scripting an Iframe from a different domain.
Possible answer here
i have a third party html page and an iframe page which is in my control i write html and js for that iframe but which click background html page its dropdow overlaps to my iframe how can i deal with it. i have tried triggering the click and focus event on my iframe page it will not work but when i click manually on my iframe my iframe come over the dropdown control.
i am attaching the snapshot of it.
I'm building a firefox extension that has an iframe inside a panel.
I use a xul file as src of the iframe.
When i click on a specific button inside the iframe, i want the iframe to be loaded again with the same src but hide some elements and show another ones. To do this hide/unhide, i have the code on the xul onload, and it works well loading the iframe the first time, or when changing the src.
But when i hide and show the panel with the same src, the onload isn't triggered again.
Should i be doing something before opening the panel the second time?
Hiding and showing the frame doesn't reload it - it really only hides and shows it without touching the content. To reload a frame from outside do:
document.getElementById("my-frame").contentWindow.location.reload();
Or from inside the frame:
window.location.reload();
For reference: location.reload()
I have a mobile web site with of a fixed header (divs) and below an iframe in which a page from a different domain is being displayed.
As I wanted a specific area of the page to be displayed inside the iframe after loading I used a pre exsiting #anchor located in the external page by defining the iframe's src with the intended domain of the page + # and the name of the anchor.
It works perfectly on all desktop browsers (in that the page is displayed inside the iframe with the correct line, where the anchor is, at the top of the iframe window), but for some reason when loading the page in a mobile browser (dolphin/Nexus S browser) it doesn't work and all I get is the page inside the iframe as if no anchor was ever defined.. Just the first line of the page at the top of the iframe window...
Any idea why it happens and how to fix it?
Thanks,
Ran.