ajax 経由でデータベースを更新した後、ページをリロードする必要があります。私の ajax post メソッドには、次のようなものがあります。
success: function (data) {
....(some code doesn't matter)
document.location.reload();
....(some other code I wish to execute after document is reloaded)
}
ただし、後のコードreload()
が最初に実行され、次にページがリロードされます。私は何を間違っていますか?