How can I reload a page after a item deletion from my DB
Dear All,
I am building a mobile wen site for the phone.
I choose to have a multi template web site.
Exemple
- <div data-role="page" id="page1">
<div data-role="header" data-position="fixed">
<h1>Page1</h1>
</div>
<div data-role="content">
</div>
<div data-role="footer" data-position="fixed">
</div>
</div>
- <div data-role="page" id="page2">
<div data-role="header" data-position="fixed">
<h1>Page 2</h1>
</div>
<div data-role="content">
</div>
<div data-role="footer" data-position="fixed">
</div>
</div>
- <div data-role="page" id="page3">
<div data-role="header" data-position="fixed">
<h1>Page 3</h1>
</div>
<div data-role="content">
</div>
<div data-role="footer" data-position="fixed">
</div>
</div>
On my first page, it collect and display data from a local database (localstorage). it display well the information.
On my second page, I have a form will delete an item from my local databae (localstorage). It works fine and when the element has been deleted, it is redirected to my first page with that code
- $.mobile.changePage('#page1', {
transition : 'slide',
dataUrl : '#page1'
});
My problem is when I am byck to my first page, the deleted item is still showed until I refresh the page (F5).
I deducted that the page is only "slided" but it does not display the last upfated information from localstorage.
My question is the following.
How can I make sure that thee page page (or other page) are refreshed or reload.
I already tried several solution as this
- $.mobile.changePage('#module', {
transition : 'slide',
dataUrl : '#module',
reloadPage : true
});
or (in the custom-script.js file
- $.mobile.reloadPage = true;
But both does not work.
Any help?
Thank