I've got a form checking whether a file exists on the server and if yes it serves it to the user. This all is done via PHP. However, if the file is not found I would like to use jquery for some client side. That's why if the file does not exists then I call echo and the jquery script. The problem is that the jquery does not get executed?

```
     if (isset($_POST['download'])) 
     {

        if (file exists)
        {
            //serve it to the user

        }
        else
        {
           //these lines do not get executed. The page simply reloads after post method
           echo"<script>

           $('#collapseOne').show();
           var content = $('#s').val();
            $('#p').val(content);

          </script>";
       }
     ?>

```