<?php if(your condition){ echo "<script> window.onload = function() { yourJavascriptFunction(param1, param2); }; </script>"; ?>
<?php if($_POST["action"] == "memberadd"){?> pop_up_box(); // jquery function <?php } ?>