Prevent ios pinned app refresh - ios

How do I stop a pinned web page from refreshing each time the user clicks its' icon.
I have created a jqm web app with the idea that users pin it to their home page. However each time I press the corresponding icon it reloads the page. I'd like it to remain in the last viewed state until an explicit refresh is called. Is this possible?
Thanks

Not alot to go on here...
Have you tried to bind .preventDefault() to the pinned items.
$(youritems).on('click', function(e){
e.preventDefault;
});

Related

How to navigate back to a Page and avoid reloading webview?

I have a Windows Phone Store app (XAML) with a Page (MainPage.xaml) that has a webview that loads content and URLs. At certain point i have to navigate to a different windows phone page (Page2.xaml), once the data there is submitted i navigate back to MainPage.xaml, but the webview control always reloads the content and user has to reenter the data again.
Is there any way to make a snapshot of the webview and load it when Navigating back to MainPage.xaml?
I have tried the NavigationHelper, but in the onNavigatingFrom event from MainPage when i try to save the Frame.Content, its the Page2 the one being passed in the NavigationEventArgs.
Any ideas?
One way to do it is to never leave the page. To do this, create two grids. One for the webview and one for the other view. When the page loads, show the first grid and hide the second grid. When you want to show the second view hide the first grid and show the second.
I have used this method in several apps on the phone and windows store and you can simulate popups this way as well.

jQuery Mobile popup that doesn't move when scrolling the page

I am using jQuery Mobile 1.3.0 RC1. I have a popup that I create programmatically at the bottom of my page and close after a few seconds using setTimeout (toast notification). It works very well, however if I happen to scroll the page while the popup is displayed, the popup gets scrolled too. I would like the popup not to move, i.e. stay in its position relative to the screen, not relative to the page. Is there a way to do that ?
I have tried playing with the data-position-to attribute in the HTML element, with the positionTo option of the "open" method, and tried placing the popup element inside a fixed transparent footer, none of these resulted in the desired behavior.
I had a similar problem last week. Finally solved it using modal dialog instead of popups.
For popups, I could find following.
$("#myPopup").on({
popupbeforeposition: function () {
$('.ui-popup-screen').off();
}
});
Which helped me in prevention of closing the dialog while user touched outside of popup. But scrolling issue was still there. So I changed all popups to modal dialogs. Hope it helps someone.

jQuery Mobile app not not displaying elements correctly

SO...my app has a few issues, but I am DESPERATE to solve this one first. Any thoughts and suggestions are welcomed. Here is the app:
http://pocketfacilitator.com
Here's the issue - (NOTE, Firefox doesn't even allow this issue to fire, so maybe try Chrome or Safari, or a mobile browser):
From the home page, click on Portables > List All Portables. Now, click on any of the PLUS signs on the right (or two or three, doesn't matter). Now, check the "TODAY" page (in the very bottom nav bar). It will display the list of games you clicked on, but the way they are displayed is totally jacked. BUT...if you RELOAD the page (or just click the red CLEAR button), and repeat the process, it looks normal. What have I done wrong?
If you dare: in Firefox, it won't even let me add an activity -- clicking on the "+" button yield NO effect.
I appreciate any help. Cheers!
Try to call refresh() method on your listview after you dynamically add items
$(this).parent().appendTo('#todaylist');
$('#todaylist').listview('refresh');
See Updating lists
If you add items to a listview, you'll need to call the refresh()
method on it to update the styles and create any nested lists that are
added.

How to refresh a app without quitting to apply localization in Sencha Touch 2

When the use selects a different language in a settings screen, I want the app to re-launch so that the navigation and the content is refreshed-reloaded. I currently am forcing this by handling the show method on each class which is not ideal and highly repetitive. This approach does not work for refreshing the tab panel which is always present and there is no event where I can trigger a reload of its content (at least not that I understand).
Ideally I would like the entire app to reload once the user selects a different language and be in a state as if after initial launch. Is there an easy way to accomplish this?
What's worked for me has been:
window.location.reload();
It'll reload the entire app without the user having to relaunch the app from the home screen. Assuming you're working in a webview, all of the window commands work as they would in the browser.
setTimeout(function() {
window.location = 'index.html';
}, 1800);
1800 time line to restart

How to refresh the page after connecting with twitter using the twitter connect button?

I need to simply refresh the page upon someone selecting the twttter connect button. Right now it just gives a pop up to allow the app, then changes the button to connect, but stays on the same page.
Without any code, Im going to stab at theres some javascript going on, at the end, just set the window.location to be the page as it is, should reload.

Resources