Welcome Guest, Not a member yet? Register   Sign In
redirect() within an iframe
#1

[eluser]irimi[/eluser]
Hello,

I think the problem is more a PHP one than CI... But it's still a problem Wink

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.
#2

[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>
#3

[eluser]irimi[/eluser]
OK that's what I thought (I should have mentioned it). I hoped there was a 100% PHP solution...

Thanks !
#4

[eluser]saidai jagan[/eluser]
We shd use [removed] (Or) window.parent.location I think So,
#5

[eluser]aswath[/eluser]
Quote:&lt;?php echo "TEST";?&gt;
#6

[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 Wink

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]
#7

[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 !




Theme © iAndrew 2016 - Forum software by © MyBB