How do I reload the page after an AJAX call is done with a dialog?

后端 未结 2 1453
傲寒
傲寒 2021-02-14 10:49

so I have a dialog UI with a form once a user click on a link it opens. Once they click \"Add button\" it create a AJAX call that submits the data into the database. What I need

相关标签:
2条回答
  • 2021-02-14 10:59

    You can try many ways to reload the page, I have tried few, at least few may help somebody.

    location.reload()
    
    location.reload(false)
    
    window.location = window.location
    
    window.location.reload();
    

    If you using link then use this :

    location.href = location.href
    
    0 讨论(0)
  • 2021-02-14 11:19

    You have a typo:

    windows.localtion.reload();
    

    Should be

    window.location.reload();
    
    0 讨论(0)
提交回复
热议问题