locked
refresh needed to show results RRS feed

  • Question

  • Have some javascript in a custom list that updates a field in the list. It requires me to refresh the list a second time in order for the results to show up. I will not show code unless requested but am using spservices with listitemupdate.

    thanks

    Wednesday, July 20, 2011 8:28 PM

Answers

  • Are you saying that you want to refresh the page once your javascript finishes updating the list items? In which case just call window.location.reload(), this will cause a full browser refresh.

    A nicer way might be to get the ID of the html/webpart containing the list data, use AJAX to get a fresh copy of the page and then pull the DOM object from the new copy of the page and overlay it into the currently visible page, thus refreshing the data without showing a full refresh to the user.

    Paul.


    Overweight SharePoint addict!
    • Marked as answer by baryo Thursday, July 21, 2011 3:58 PM
    Thursday, July 21, 2011 1:37 PM

All replies

  • Are you saying that you want to refresh the page once your javascript finishes updating the list items? In which case just call window.location.reload(), this will cause a full browser refresh.

    A nicer way might be to get the ID of the html/webpart containing the list data, use AJAX to get a fresh copy of the page and then pull the DOM object from the new copy of the page and overlay it into the currently visible page, thus refreshing the data without showing a full refresh to the user.

    Paul.


    Overweight SharePoint addict!
    • Marked as answer by baryo Thursday, July 21, 2011 3:58 PM
    Thursday, July 21, 2011 1:37 PM