Welcome Guest, Not a member yet? Register   Sign In
window.parent.location.href = 'http://yoururl.com';
#1

[eluser]new_igniter[/eluser]
I am using Nick Stakenburg's Lightview and need to close an iframe that is sitting in a lightbox above the page. His command is to use:
Code:
window.parent.location.href = 'http://yoururl.com';

How do I do such a thing in CI using the redirect function in a controller?
#2

[eluser]xwero[/eluser]
If you are talking about going to the landing page of the site using redirect just add an empty string.

If you are talking about closing the lightbox it is bad form to use location.href because the idea now is to use javascript to emulate desktop software UIs that don't reload their interface when changes are made. A better way to do it is to hide/remove the overlaying elements.
#3

[eluser]new_igniter[/eluser]
I need to refresh the page however.
#4

[eluser]xwero[/eluser]
Can't you use ajax to reflect the changes you made in the iframe?




Theme © iAndrew 2016 - Forum software by © MyBB