Refresh page after posting data to server via Ajax

Refresh page after posting data to server via Ajax

I am sending information over to an external server which updates some content on the database at that server. The update is working but the updated information is not shown on my application. I need to close the application and re-open to view the updated content. Is there anyway I can make the refresh occur without having to restart application.

I was trying to make the refresh occur after a successful POST but it doesn't happen. The POST occurs from a page with the ID of #update. I want to just refresh the content of that page with the new information from the database. The application is built using JQuery Mobile and PhoneGap.

 
  1. $.ajax({
  2. type: "POST",
  3. url: "myURL",
  4. data: {},
  5. error: function (jqXHR, textStatus, errorThrown) {
  6. alert("Server down. Try Later")
  7. },
  8. success: function (data) {
  9. //I am able to arrive here after a successful update to the server.
  10. $.mobile.changePage("#update"); //Doesn't refresh
  11. alert("Update Successful"); //alert appears
  12. }
  13. });