senchalabs/jQTouch — Issue #318: How to pass a variable to destination view
Author: anathor
Created: 2011-11-07 05:23:41+00:00
State: open

Hey,

I have a list in my app (lets say they are people). From this list I would like to go to a new dynamically loaded view and pass that view a variable (the id of the person clicked.

Person

I assumed I would be able to then on the destination look at the URL and pull that value back out. Further investigation shows that due to the ajax loading/inserting into the current DOM the URL is rewritten to be the current HashTag

http://example.com/#PersonEdit

Makes sense but I was wondering if there is a way to get the selected id across without resorting to the use of global variables.

Further detail:
The data that will be presented in the PersonEdit.html page already exists on the client in a local data store so formatting the page server side is not an option.

Thanks in advance for any comments