I'm just starting to experiment with jQuery and trying to apply it to a very simple CRUD application, which consists of a list, creating, editing and displaying pages.
I applied jQuery-mobile markup conventions and everything looks very pretty. However, I am confused by the issue of updating outdated data. I understand that jQuery-mobile redefines links and submits a form using AJAX to deliver a "one-page application." Again, this works for me, and all my data-role="page" stuff loads and fails correctly.
I donβt understand that when I change the data (for example, submit a form to create a new element, and then go to the list page), some pages must be updated from the server in order to receive the changed data. What jQuery-mobile does is simply re-render the previously loaded page, which is now out of date. Similarly, every time I re-visit the page creation page to create a new item, the form is still populated from the previous submission, since the page is not really refreshing.
If this is what I need for the script itself, this is fine, but I'm curious that it doesn't seem to be mentioned, what I would think of a common script in jQuery-mobile docs. Looks like I should be missing out on something obvious. How do other people deal with this?
jquery-mobile
Rob fletcher
source share