I notice on iPad and Chrome (and probably true for other devices with larger screens) that form elements, like textfields do not maximize the horizontal space of the screen.
For example, I want to use the unused space (red lines) -
Hi. I'm using the latest git code and I've noticed in the last week that the auto-generated back buttons are not longer showing on the header toolbars.
I'm using a multi-page design. My understanding is that the 1st page does not get a back button, but none of my pages get the back button.
Has something changed so that back buttons are no-longer automatically created? Or do I now need to specify an attribute to make the appear? I scanned the docs but cannot see anything.
Any one else experiencing this problem - with the below code, a single swipe results in 2 x prevs printed on the console. Its been happening to me with the latest code (18 Jan 2011). Tested on Chrome and iPad Safari. I've verified that I only have one bound handler.
Hello, I'm not sure if this is a bug or expected behaviour if I'm calling changePage() form a AJAX callback function. Any comments appreciated.
I have create a HTML5 manifest for my app and verified (with JS events chrome://appcache-internals/) that files are caching. I can replicate this on Chrome (Win) and iPad.
This code is execured from a click event bound to a button:
$.getJSON(url, null, function(data, textStatus) {
if (data.count == 0) {
alert("No Results Found"); } else { $.mobile.changePage("ShowResults", "slide", false, true); // **** THIS LINE **** } });
// **** THIS LINE **** above causes a server resuest to me made. This appears in my Apache error log:
[Wed Jan 11 11:10:13 2011] [error] [client X.X.X.X] File does not exist: /opt/wwwroot/theapp/ShowResults
It appears that the request is the URL with the # missing.
The page still transitions and shows correctly in the app.
If I call $.mobile.changePage("ShowResults", "slide", false, true) directly or from Chrome's JS console no server request is made, and the cached version is used.
// Cities normally come from an AJAX request. Static array for testing.
var cities = JSON.parse('[{"city":"City A","postcode":"1234"},{"city":"City B","postcode":"5678"}]');
for(i in cities) {
var city = cities[i];
var value = city.city + ":" + city.postcode;
var tmp = "<option value='" + value + "'>" + city.city + " " + city.postcode + "</option>";
$e.append(tmp);
}
$e.selectmenu('refresh', true);
}
}
I can select options ONE and TWO successfully, however I cannot select the dynamically added options City A or City B.
Testing In Chrome, the JS console gives this error when selecting the cities - Uncaught TypeError: Cannot set property 'selected' of undefined. Safari on iPad gives this error - TypeError: Result of expression 'option' [undefined] is not an object.
Am I dynamically adding options correctly? Any advice would be greatly appreciated.
Is there any way to show (and hide) a dialog using javascript? We're test-porting an application to JQMobile (it looks promising!) and have a generic message dialog that is manipulated by javascript (eg change message).
The best I can come up with has been window.location.hash = "theDialogId", but that seems rather hackish, plus the dialog ends up in history and I cannot control the transition effect.
I did find a post mentioning $.changePage(),. but that did not work on dialogs.