Hi everyone, thanks for reading and replying to this dummy question.

I have a script that open a javascript alert box -
what I would like to do is after clicking the "OK" button is to direct the user to a new page.

the alert is working, just when I click the ok button, nothing happens.
Any help would be aprreciated,
thanks

echo '<script type="text/javascript"> setTimeout(function() { alert("my message" window.location = "/new-page.php";); }, 1000);';

try this

<?php
echo ("<SCRIPT LANGUAGE='JavaScript'>
    window.alert('Succesfully Updated')
    window.location.href='http://someplace.com';
    </SCRIPT>");

?>

Hi,

Syntax error :-)

setTimeout(function(){alert("my message");location.replace("/new-page.php");},1000);

@IIM... This worked a treat thank you...

Hi how can i set the timeout function on

<?php
echo ("<SCRIPT LANGUAGE='JavaScript'>
    window.alert('Succesfully Updated')
    window.location.href='http://someplace.com';
    </SCRIPT>");
?>

thanks a lot it really helped me...:)