redirect() within an iframe - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: redirect() within an iframe (/showthread.php?tid=25717) |
redirect() within an iframe - El Forum - 12-22-2009 [eluser]irimi[/eluser] Hello, I think the problem is more a PHP one than CI... But it's still a problem I don't like it at all, but I'm using an iframe in a project, to obtain an image uploader into a form page, to avoid popup windows. All the project (main pages + uploader iframe) are coded with CI. Of course I'm using an iframe, not a simple DIV, because of the "file input" tag, which can't be handled with AJAX alone into my main page. So the iframe contains a form with text inputs, and a file input. When this form is submitted and validated, I want to redirect the iframe display to have a success message, thus cleaning the POST data. Unfortunately, if I use the redirect() function from the URL helper, the server returns a 400 ("Bad Request") error. Is it possible, with or without the CI functions, to do a redirection within an iframe ? Thanks. redirect() within an iframe - El Forum - 12-22-2009 [eluser]saidai jagan[/eluser] I think to redirect within the iframe we shd use javascript. U can ask Mr.<a href="http://www.google.com">Google</a> redirect() within an iframe - El Forum - 12-22-2009 [eluser]irimi[/eluser] OK that's what I thought (I should have mentioned it). I hoped there was a 100% PHP solution... Thanks ! redirect() within an iframe - El Forum - 12-22-2009 [eluser]saidai jagan[/eluser] We shd use [removed] (Or) window.parent.location I think So, redirect() within an iframe - El Forum - 12-22-2009 [eluser]aswath[/eluser] Quote:<?php echo "TEST";?> redirect() within an iframe - El Forum - 12-22-2009 [eluser]aswath[/eluser] [quote author="irimi" date="1261490876"]Hello, I think the problem is more a PHP one than CI... But it's still a problem I don't like it at all, but I'm using an iframe in a project, to obtain an image uploader into a form page, to avoid popup windows. All the project (main pages + uploader iframe) are coded with CI. Of course I'm using an iframe, not a simple DIV, because of the "file input" tag, which can't be handled with AJAX alone into my main page. So the iframe contains a form with text inputs, and a file input. When this form is submitted and validated, I want to redirect the iframe display to have a success message, thus cleaning the POST data. Unfortunately, if I use the redirect() function from the URL helper, the server returns a 400 ("Bad Request") error. Is it possible, with or without the CI functions, to do a redirection within an iframe ? Thanks.[/quote] redirect() within an iframe - El Forum - 12-22-2009 [eluser]irimi[/eluser] My mistake, when I used redirect(), I added the $method parameter with "redirect" value... Thanks copy-pasting... So, with only the $uri parameter into redirect(), it works fine ! This new topic gave me the idea... Sorry ! |