EllisLab text mark
Advanced Search
     
window.parent.location.href = ‘http://yoururl.com’;
Posted: 28 May 2008 07:35 PM
Joined: 2007-12-15
118 posts

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:

window.parent.location.href 'http://yoururl.com'

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

 
Posted: 29 May 2008 03:20 AM   [ # 1 ]   [ Rating: 0 ]
Joined: 2006-07-14
4237 posts

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.

 
Posted: 29 May 2008 03:27 AM   [ # 2 ]   [ Rating: 0 ]
Joined: 2007-12-15
118 posts

I need to refresh the page however.

 
Posted: 29 May 2008 03:46 AM   [ # 3 ]   [ Rating: 0 ]
Joined: 2006-07-14
4237 posts

Can’t you use ajax to reflect the changes you made in the iframe?