Denmark Puso

Denmark Puso

  • NA
  • 232
  • 47.6k

Page reload after click alert.?

Sep 25 2019 6:30 AM
ill try to reload my page again after alert. the problem is when i click ok my prompt show again then i need to verify the number again and back to alert again.
  1. $(document).ready(function () {  
  2.         var contact = prompt("Please input contact number if you are already customer");  
  3.         $.ajax({  
  4.             url: '@Url.Action("getclientbycontactnumber", "client")',  
  5.             data: { contactNumber: contact },  
  6.             success: function () {  
  7.                 alert("Success");  
  8.                 window.location.reload();  
  9.             }  
  10.         });  
  11.     });

Answers (4)