Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple re-directs

Status
Not open for further replies.

PeterMac

Programmer
Mar 9, 2001
51
0
0
CA
I have searched and searched... I have to ask...

Is there a way to spawn a new page AND re-direct as script at the same time... I am trying something like this... I know this is in PHP ... but it is client side actions that I want to accomplish...

<?
header( &quot;Location:process_moneyout.php target='_new'&quot; );
header( &quot;Location:print_worked.php&quot; );
?>

I know that the first header's syntax is wrong, but the concept I am trying to accomplish is that the user clicks a &quot;printer friendly&quot; button that allows them to print a report in a new browser window... then when that is done, I want to redirect the original browser to a page that asks them if the print worked fine and then continue with the PHP application...

Any help appreciated.
Petermac
 
Well, in JS you could do this:
<script>
window.open(&quot;process_moneyout.php&quot;,&quot;_new&quot;);
location.href=&quot;print_worked.php&quot;;
</script>

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life=life-1};
 
I got it figured out in the meantime... thanks for your response though... I used...

<script language='JavaScript'>
<!-- start script
function openWindow(url) {

popupWin = window.open(url,'Name', 'top=0,left=0,resizable=yes,width=850,height=550,scrollbars=yes,menubar=yes,toolbar=no')
document.moneyout.submit()
}

function openURL() {

window.location=&quot;clear_payments.php&quot;;

}

// done -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top