How to pop up the message box of the plug-in before jumping to the page

$.ajax ({

)
                type:"post",
                url: "/menu/delete",
                data: {"id":$("-sharpoperateMenuOfNodeId").val()},
                success:function(data){
                    if(data.success == true){
                        toastr.success(data.message);
                        window.location.reload();
                    }else{
                        toastr.error(data.message);
                    }
                },
                error:function(){
                    toastr.error("");
                }
            });
            
            
            
          toastr.success(data.message);
Mar.28,2021

reload refreshes the page, and the prompt box will disappear.
so make sure that Synchronize executes in the order: pop-up window appears first, then disappear, and then reaload ();
1. Add a confirmation button in the pop-up window, click to jump
2, and, reload (); after setTimeout timeout.


settimeout 
$.ajax({

    type:"post",
    url: "/menu/delete",
    data: {"id":$("-sharpoperateMenuOfNodeId").val()},
    success:function(data){
        if(data.success == true){
            toastr.success(data.message);
            setTimeout(function() {
              window.location.reload();
            }, 3000)   
        }else{
            toastr.error(data.message);
        }
    },
    error:function(){
        toastr.error("");
    }
});          

you can check whether the plug-in has a callback function. If so, you can jump to the page in the callback function. If not, you can write a timer to jump to


your logic will definitely jump to the page without popping up the prompt box. Put the prompt box before the jump.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e579af-45446.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e579af-45446.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?