I know there are question have been asked around resembling to this one, but still I am not getting proper concept of this. I am currently loading an iframe through javascript in following manner:
jQuery('.out-div-login').html("<iframe id='parent' frameBorder='0' width='320' height='500' src='"+_url+"'></iframe>");
Which is working fine. (its cross domain). After loading my application inside given iframe, I want to come back to original state where .out-div-login
was loading iframe into parent html.
From outside of iframe I can do this by accessing iframe using its id
attribute, but not from the inside. Is there any way I can reload the iframe by giving its src again ? or by above code but from inside the iframe ? Thanks.
Update
I have tried below code without any success as of now:
var ifr = $('iframe[id="parent"]');
from one of js file inside iframe
with id parent
. when I do console.log(ifr)
it gives in firebug something like this Object[]
instead of <iframe id="parent">
iframe
reference from inside the currentiframe