2

I'm hoping someone can help me. I am trying to just pass a variable from one page to another in my jQuery mobile website, which you can see here: http://www.muskermcintyre.co.uk/tablet.

The usual way I would do this is the following:

  • To have a link on the list view page which looks something like this:

<a href="#fullDetails?profileID=123456">View details</a>

  • Then I would need to use $_GET['profileID'] on my full details page, to get the correct property from the database, obviously just getting that profileID which has been passed from the link on the previous page. It seems this is not possible in jQuery mobile.

Please can anyone suggest the best way to do this?

Thanks!

aboother
  • 41
  • 1
  • Have u tried with AJAX – Vineet1982 Feb 27 '13 at 09:52
  • Why, What happens from jQuery Mobile? – Starx Feb 27 '13 at 10:12
  • Take a look at my other answer: [http://stackoverflow.com/a/14776523/1848600](http://stackoverflow.com/a/14776523/1848600), there you will find several solutions, including a working solution that uses a PHP. Also take a look at my other article, you will find various solution of storing/sending data between page transitions: http://stackoverflow.com/a/14469041/1848600 If you need more implementation help send me an email. – Gajotres Feb 27 '13 at 10:02

2 Answers2

0

You can use the same method for your JavaScript as in PHP, the only difference is that you don't have the query string variables as an array named $_GET, you have to parse them yourself. See this answer: How can I get query string values in JavaScript?

Community
  • 1
  • 1
chiborg
  • 26,978
  • 14
  • 97
  • 115
0

PHP is a server side scripting language.
Once your page is loaded (i.e HTML is generated). You will have to use either JavaScript or JQuery.
Or you will have to post back to server to render new HTML.