I have my login page in an iframe and wished to reload the parent window using ajax and jquery from within iframe without refreshing but i\'m getting errors like this
(
You can use:
window.parent.location.href = "Create?Param=value";
Or:
window.parent.location.href = "http://www.stackoverflow.com";
I could achieve this by reloading the page using javascript
parent.location.reload();
then i fired a trigger to open the target iframe
$("#log-inout").trigger("click");
I needed such system for a peculiar condition. This might help others in similar conditions.
dont bother! why use iframes at all if you are using ajax.
just load the login using
$("where you want to load the content here").load("src of your iframe here");
//load via ajax
$("div").load("login.php");
much simpler and alot more elegant.
parent.location.href=parent.location.href
gives a smoother result than
parent.location.reload()
the latter forces a complete reload while the first seems to update more effectively almost like ajax.