echo "<script type=\"text/javascript\">varn stay =confirm (\"Item: ".$F_item."\"); if(stay) top.location='received.php?stay=1'; </script>"; <? if($_GET['stay']) //check if stay contains a value equating to true { pilihPembekal($f_supp,$f_pem,&$dberror); } ?> here is my latest script, when i run it on server, the function of pilihPembekal () did not perform. please u check it. is it right? i write this script based on ur example.