<script> $(document).ready(function(){ $("form").submit(function() { setTimeout("alert('5 seconds!')",5000) return false; }); }); </script>