While I’m a bit of a dab hand in php, I’m stumbling my way through a JQuery Mobile project via Phonegap for an iOS app. So getting my head around javascript (quickly) has been challenging. Managed to solve most problems mostly with the help of the good folk here, so thought I’d ask this one which I can’t find a solution for.
I have a list which is generated from an ajax request (summary with a heading and short description), with the full detail being stored in an SQLite DB for offline use. I’m wanting to open a dialog with the full detail on click. JQM’s data-rel dialog is a breeze for static pages, but I can’t figure a means to send the dialog page an index parameter to pull the data from the DB. Once I get the parameter down to the “page” I’m pretty confident pulling the data and replacing the DOM elements, so the short question is how do I send the index parameter from the list to the dialog page?
Thanks heaps in advance!
You can, in your list (I am assuming
data-role="listview"here), build the links that represent clickable elements:where you insert
someIddynamically when you create your list.In dialog page you parse your URL and get the ID.
Update
The following confirmed as working in Safari (on my desktop):
and the usage would be:
which would contain the following string: