Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Ajax request did not succeed #1249


User avatar
0
joemo created

How can I prevent or suppress the 'ajax request did not succeed' error popup? It happens when a user forces a refresh


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    It probably happens if user refreshes page during an AJAX request. If you created your project from templates, you are probably using sweetAlert as message box. If so, you can try to change showMessage method in abp.sweet-alert.js to handle it. In that method, you can check if page is being refreshed. You can do that by registering some unload event (<a class="postlink" href="http://www.w3schools.com/jsref/event_onunload.asp">http://www.w3schools.com/jsref/event_onunload.asp</a>) and setting a flag to true and checking it in your code. If you success, please share your solution with us.