This topic is locked

popup and redirct

9/12/2009 3:08:48 AM
PHPRunner General questions
G
garethp authorDevClub member

Hi
I have the followoing code in after record added event which works ok...

header("Location: por_details_list.php?a=return");

exit();


I need a popup message so I changed the code to get a popup and this works ok ...

echo "<script>alert('I\'m a popup window')</script>";


However when I try and combine the code I get an error message.

echo "<script>alert('I\'m a popup window')</script>";

header("Location: por_details_list.php?a=return");

exit();


Can anyone help with the code that displys a popup first and once the user click OK they are redirected.
Many thanks

J
Jane 9/14/2009

Hi,
try to use this one:

echo "<script>alert('I\'m a popup window')</script>";

echo "<script>window.location.href='por_details_list.php?a=return';</script>";