skip to Main Content

Run script only once – Jquery ajax

I have the form like this: <form method="POST" action="bubble2.php" id="bubbleName"> <input id="myInput" name="namehere" type="text"> <input name="submit" type="submit"> </form> And the script which prevents redirecting or reloading the page after submit: <script> $(document).ready(function(){ $('form').submit(function(e){ e.preventDefault(); $.ajax({ type: 'POST', url: 'bubble.php', data:…

VIEW QUESTION
Back To Top
Search