About page hashing and history.
Hello, suppose I have 3 pages, Main Page, Detail page and Conditional Page. The standard flow of the site is this one: User enters main page, navigates to detail page and depending on his inputs, he goes into the conditional page, then returns to the detail page. What I am wondering is how you set the system so that, if a user who got into the conditional page presses back, he returns to the previous page, the detail page. However, if the user presses back after the conditional page he should go
include a script in another script
Hi, I have a main.js and xxxxx.js main.js will be for every page in my website where xxxxx.js is a page specific, e.g. new_employee.js, employee_details.js, help.js, etc Is it possible to load the xxxxx.js and with the xxxxx.js I include main.js? Otherwise it will have a duplicate pagecreate event? is this ok? Thanks, Jassim
pagecreate instead of document ready?
Hi, I was always using: $(document).ready(function() in my JQuery and now I am starting with JQuery Mobile. so is: $(document).on("pagecreate", function() the best to use for the mobile? Thanks, Jassim
why my JQM code doesn't work in google script?
Hi all, I'm new in this JQM world, so there is a quick question... create a HTML file(list_checkbox.html) in google script as below: <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> <ul data-role="listview" data-filter="true" data-filter-placeholder="Search fruits..." data-inset="true"> <li><a
What is the best way to bind click events?
Hello. I'm an 'experienced' HTML5/CSS3/JavaScript Front-End developer and this is my first time using a framework that employs a dynamic DOM instead of loading pages, and I've come to the question: What is the best way, considering how jQ Mobile handles its dynamic DOM, to bind click events? So far I have tried 3 methods that work, but I do not know which is the preferred one: <div data-role="page"> ..... ..... <script type="text/javascript"> $("#mydiv").click(function()
Detecting online status
To instruct the user, I have used the jqXHR.fail function in the Ajax call to do some error handling in case the server returns an error, or is not available at all (statuscode = 0). I would like to disable the submit button, but off course it needs to be enabled again when the server is reachable again. Any pointers to some code snippits or pluggins that are known to work with JQM are welcome. I was thinking about iteratively trying to download something small from the server, and when that succeeds
Scroll the list not the page
Hi, I have <select> listing all blocks in the country to let the user to select his block but the list is too long which cause the page to scroll. Is it possible to just let the <select> to scroll instead of scrolling the whole page? This s the page and the Field name is Block: http://cb.savanna.online/signup.php Thanks, Jassim
last border in listview isn't visible
Hello, I have a problem in my webapp with the last border of a listview which is missing. The link to my webapp is: mobile.wks-webapp.bplaced.de The listview is on: detail.html
<select> is not working properly in JQuery Mobile
Hi, I have a <select> which is acting funny when the user clicks on it. This is the only <select> in the page with such behavior. Sometimes, it opens the list in a new page and sometimes it just show blank list and sometimes both issues at the same time. How can I fix this please? this is the link: http://cb.savanna.online Thanks, Jassim
How to test jQuery Mobile in node.js
Is anyone using Node.js to test jQuery Mobile? I'm working on a plugin, which interacts with jQuery Mobile events, but doesn't do anything visual, so Node.js would be the ideal place to run my unit tests. I've found instructions for testing jQuery with node ( https://github.com/UncoolAJ86/node-jquery/blob/master/README.md ), but trying to extend this to load jQuery Mobile, I'm getting an error: TypeError: Cannot set property 'mobile' of undefined I am hopeful that someone else has configured jQM
How to disable page caching?
hi, I have pages kept in separate php files and I set : <div data-role="page" id="pageNewLeave" data-theme="b" data-dom-cache="false" so data-dom-cache should take care of no caching I guessed but it's ot happending. For example, in pageNewLeave if I click submit it's redirecting to the home page and when I click on the link New Leave I still see the selected dates and submit button is invisble (from the last post). How can I fix this please?
transitions doesn't proper work after I opened a popup dialog
Hello, after I opened a popup dialog in my webapp mobile.wks-webapp.bplaced.de the transitions doesn't work proper anymore. The problem is only on mobile devices (tested on iPhone 6s). The button to open the popup dialog is on the 2. page or on the 3. page.
jquery mobile event is not bound when coming back to page
Hej everyone, can anybody help me with the problem descriped here? I am trying to solve this problem since three days and can't find any solution. Thank you for any help :)
Display JSON data
I have two php files on website, 1 - index.php and 2 - list.php. A menu link in index.php points to the list.php page. The data on list.php is JSON from mysql server. Data can be correctly displayed. So far so good. Problem: Unless the link specifies data-ajax=“false”, the data does not render until I refresh the list.php page. Not a huge problem, but is there a way to achieve desired result without using data-ajax=“false”? Here is the javascript: $(document).on("pagecontainershow",function(){
Problem with jQuery Mobile Tables - Column Toggle Table
Hello users! I want create a web app for my homepage. But my knowledge status in javascript and jquery is just a little bit low. I can not find my syntax error or my thoughts are wrong. I will be glad if somebody can help me. First of all, I send an array from my msql-database with PHP and JSON to the javascript. Just like this: [{"eintrag_id":"2473","aktiv_datum":"2016-01-05"},{"eintrag_id":"2469","aktiv_datum":"2016-01-05"}] When I startet the page all columns and rows will be loaded in the table.-
Save and restore jqm form
I have made a form in jquery mobile with radioboxes, checkboxes, tekstfields, multiselect. I want to save my form data with a save button and want to restore the data with a restore button. I found a great script http://jsfiddle.net/mindplay/yLPY3/ But when I copy it to my form or I convert the script to jqm, ony the textfields are saved and restored. Checkoxes, radiobuttons etc are not saved. Should such a script work with jqm ? or is there an alternative way to save and restore a compleet form
change data-theme dynamically
Hi, I am trying to change te dialog theme using below code but it is not changing... why? here is my div: <div id="dialogAlert" data-role="popup" data-overlay-theme="b" data-theme="b" data-dismissible="false" style="max-width: 400px;"> <div data-role="header"><h1 id="msgTitle">Error!</h1></div> <div role="main" class="ui-content"> <p id="msgAlert"></p> <a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back">Close</a> </div> </div> and this is my jquery:
Stuck trying to change the id and text of a button.
I am stuck trying to change the id and text in the header of a page. The text currently says 'confirm' and the id=btnConfirm - when this is pressed I want to change the text of the button to say 'edit' and the id to change to btnEdit https://jsfiddle.net/a4poster/ysyxvtyp/2/ Thanks in advance.
How to display data from JSON
Hi there, I'm trying to get a data from cross-domain XML file using JSON. There are numerous examples out there but I'm having trouble displaying the data from the XML file. This is my first attempt at using JSON to fetch data from cross domain xml file. My goal is to parse the xml file and based on the provinceCode create array or list for each provinceCode and add the cities that belong to same province to the appropriate array or list. E.g. cities belonging to province BC will be added to array
JQM Panel control not working on Ipad device
Hello , I have used JQM Panel control for my application, which ultimately working on browser and iPad simulator. But it is not working real Ipad device. Please help me out to solve this problem.
Popup widget and ajax duplicate -screen and -popup divs
Hello, I am trying to use the popup widget for my form validation which uses ajax. I have three variables $id $header $message and here is the html I use to generate the popup <div data-role="popup" id="$id" data-dismissible="false"> <div data-role="footer" data-theme="b"> <h1>$header</h1> </div> <div data-role="content" data-theme="a"> <h3 class="wrap ui-title">$message</h3> <a href="#$id" class="ui-btn ui-btn-inline ui-corner-all" data-rel="back" data-transition="fade">OK</a>
Jquery Mobile popup reloads the page after updating the same page from controller.
Hello Guys, I am working jquery mobile spring frame work. Problem is with the popup, When I call controller from the popup it returns the same page and updates the content. After updating from the controller When I click on popup it reloads the same page and popup won't fire. Can any one help me to fix this issue?? Thanks.
convert theme's jquery mobile android to ios
Hello i want to know if is possible convert a theme's android (jpholo) to ios' theme.
Easiest way to add an edit/add/delete function for an external database?(New to JQuery Mobile(
I have inputted some values into my external host database and if anyone could share with me the easiest way I could add these function with possible instructions it would be greatly appreciated.
Need help with scroll velocity
Hi, We have a requirement for implementing scroll (like numbers 1 to 100) in Mobiles more over like slideshow. Numbers 1 to 100 will be displayed like a slideshow(at anytime only 3 numbers visible); I used Jquery to handle the slideshow feature without any external plugins. I used Jquery Mobile to capture swipe events. Every time user swipe left ot right I am changing the position of the numbers slide(div) left position to width of the number div. The QA raised issue like basing on the velocity of
How to return multiple JSONs?
Hi, I am using below PHP and jquery to generate json in order to read it using jquery: PHP: $mysql_query = $mysql_connection->prepare('CALL sp_get_request_processing_period(:param_request_category)'); $mysql_query->bindParam(':param_request_category', $request_category, PDO::PARAM_STR); $mysql_query->execute(); while($mysql_row = $mysql_query->fetch()) { $processing_days[]=array('days'=>$mysql_row['processing_period_in_days']); } $mysql_query = $mysql_connection->prepare("CALL sp_populate_request_purpose(:param_request_category)");
Swipe and Panel on the same Page just don't work
I have just overhauled my mobile page from 1.3 to 1.4.5 as there were problems in swipes. On the new platform I cannot get the swipe gestures to work with a panel on the same page, for my application the panel just doesn't appear when the ICON is clicked on the first page loaded. I have used the swipe demo as my foundation and this seems to work OK. I found that removing the line in red below from the supplied JS fixed the problem, however when I swipe forward say two pages and then swipe back one
jQueryMobile Header Rendering / Background failed while Page Transition
im just working with JQM 1.4.3 / 1.4.4. With Chrome, Firefox and so on it all works fine (Desktops) - but if i "emulate" a mobile phone with Chrome Developer Tools or try the site on a real mobile the fixed header of my Site fails to render WHILE Page-Transition is going on. I googled so long but the generally known "Flickering Issues" - Solves didnt clear my Problem. To make it more visible to you there are 2 Screenshots - the first one shows the Page-Header as it should be. The second One shows
The background color of checkbox changes irregularly.(ver.jqm 1.4.2)
I am having a problem on using checkbox of jquerymobile.This problem can be discribed as the following steps. 1.Make a page that shows some checkboxes.And load this page into webview of Android. Javascrpit source: <input id="1" type="checkbox" value="1" data-mini="true" class="custom-checkbox"> <label for="1">one</label> <input id="2" type="checkbox" value="1" data-mini="true" class="custom-checkbox"> <label for="2">two</label> <input id="3" type="checkbox" value="1" data-mini="true" class="custom-checkbox">
Jquery Mobile Fixed Position(Transparent, during transition)
Hi I encounter a problem, Whenever I apply a fixed position to the footer, I get a transparent looking navbar, where it disappears, then reloads afterwards. Attached is a screenshot of what I am referring to, also can someone kindly help me. I know it maybe something simple, but help me please, it is driving me crazy. Here is my code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1"> <title>jQuery Mobile Web
jqm 1.4.5 background image in header/toolbar
hallo i can't make visible in the android browser a background image. is it possible? couldn't find infos about. it seems not to be possible. perhaps its no problem but i dont get it. can anyone post a simple example??? thx burro
datepicker takes the whole page width
Hi, I just started with this framework and I'm trying to have a datepicker the width I want, the position I want but anything I'm trying to do isn't working. The datepicker is taking the whole page width. I really don't understand what makes it this large since I even tried !important to my width <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="/Content/jquery.mobile-1.4.5.min.css"
vmousedown and vmouseup Not Working on mobile
I need some help implementing the jquery.mobile-1.4.5.js in my code. I'm trying to find a set of events that will work the same on mobile and desktop, touch and mouse. All I am trying to do is change the background color of button elements when touched. Here is the code: Is this correct? <script src="js/jquery-1.11.3.min.js"></script> <script src="js/jquery.mobile-1.4.5.min.js"></script> <script src="js/jquery-ui.min.js"></script> And, $('#clockin, #clockout').vmousedown(function() { $(this).css('background-color',
select menu drop-down transition?
I like JQM's select (the one you get when you set data-native-menu='false' and match lable for = with the select's id). However, I can't seem to be able to apply a transition to this puppy. I want it to gently drop down, but all that happens is this harsh drop down. Is this possible to achieve?
Remove data-type="horizontal" in javascript
Hi, I would like to dynamically change the checkboxradio widget from horizontal to vertical depending on the width of the page. window.matchMedia raises an event when the window becomes small. Then using $('.fieldset').attr('data-type', ""); the ="horizontal" part can be removed. When you create a page with just "data-type" on the fieldset the radio buttons are shown vertically as intended. However, when doing this dynamically nothing happens. I tried to call refresh() on the fieldset, but I don't
rangeslider Custom Download - not enough?
It appears the Custom Download tool for jquery mobile doesn't quite give you enough if you check the Range Slider Widget and hit download. Obviously your goal with the resulting files would be to get an example like this: https://api.jquerymobile.com/rangeslider/#entry-examples Working as-is with your custom slice of jquery mobile. But, you get this: http://jsfiddle.net/b9chris/uhz2ffke/ If you initialize it directly to make up for the lack of the Init code, you get: http://jsfiddle.net/b9chris/uhz2ffke/1/
refresh.selectmenu doesn't work
Hello, on my site wksinfo.peter.bplaced.de the select box refresh doesn't work. I have on the login screen a select box. As default it is Deutsch when you change it to Englisch it should refresh the content to English and not to Englisch. When you open the select box you can see that the two languages are translatet to english but in the select box you find Englisch. This is only on the first call. When you chnage the language twice between german and english it works.
Validation decides dynamically on next page
The idea is that during validation on form submit, it is dynamically decided what the next page should be It should be possible to go back to the same page again In reality, the pages are generated by code behind, so going to the same page again does not mean the page actually has the same content - this should also be possible. Currently in the implementation I have switched of ajax transitions, and I do the redirect in code behind. That works. But I would like to get the JQM page transitions.
Add buttons dynamically to a table element
I am trying to add buttons to a table dynamically. The purpose is to allow the user to get more info about the person indicated by 'name'. How do I get the button to be next to the name? The following is almost there but the button is on a new line due to the div. var register_tr = $('<tr></tr>'); var radioid = 'radios'+id; var register_name_td = $('<td style="vertical-align: middle;" id="' + id + '" name="studentname"> ' + name + '<div align="right" data-inline="true"><button class="ui-shadow ui-btn
URL being updated on preventdefault
Have a problem that is driving me insane! I suspect I am doing something wrong... I am using jQuery mobile 1.4.5 with multiple pages in the same HTML file. jQuery version: 1.11.3 I have a page #mainregister on which I check for any user changes. If they try to navigate away, I stop the navigation using this code (using info I found on SO): $(document).on("pageinit", '#mainregister', function(){ $(document).on('pagebeforechange', function(e, data){ ResetTimeOutTimer();
Next Page