Hello,
I'm trying to redirect the browser after executing a task
I need the redirect to be as follow:
1. header... location $URL1 (open in a new window)
2. header... location $URL2 (open in current window)
with the $URL2 I don't have any problem, but the first to be opened in a new window give me some work.. Can anyone help ?
I may also use anyohter function if any is more suitable for this task.
Thanks
Samuel
redirect
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
use Javascripts
Note that a form can only be submitted once. You can pass the form-values to other functions via $_POST, $_GET or $_REQUEST.
Code: Select all
document.myForm.target="_blank";Thanks PatrikG,
As I can't return a form, destination URL may reject it here is what I used, hope this may help other too.
To open the $URL1 in a new window
And to refresh the base window with $URL2, i use a meta tag refresh, as when testing with header function, I get an error message, header already sent (in the new window !)
A bit difficult but it's work.
As I can't return a form, destination URL may reject it here is what I used, hope this may help other too.
To open the $URL1 in a new window
Code: Select all
window.open('<?echo $URL1?>);A bit difficult but it's work.