I am trying to load a page via an ajax call using mobile.changepage shown below:
mobile.changePage( "index.html", {transition: "slide", reloadPage: true, data: id})
I’ve tried to use on the index.html all the functions such as:
$( '#mainMenu' ).live( 'pageinit',function(event){var movie_id = location.search;});
The page gets loaded but I can not get the value of “id” on the index.html page, just if I hard refresh it works.
What am I doing wrong?
Thanks
Rodrigo
Assuming that you will pass a single parameter to
page2, you could uselocation.searchinpage2to get the movie variable, but I found that it doesn’t work well for regular browsers. So, in the result page, you need to parse$(this).data('url').Also, the script code in
page2must be inside theDIV#page2block, because what is in your header HTML WON’T be changed when next page is changed (as another member noticed).The script blocks:
page1
page2