how to pass a hash value manually to a next page in jquery mobile and receive it in a pagecreate / pageshow
i tried following when a button gets clicked on page1
$.mobile.changePage('#page2?val=1', {
transition: 'slideup'
}
);
HTML Page Code
<html>
<head><title>jQuery Mobile Test</title></head>
<body>
<div id="page1" data-role="page">
<div data-role="header">
<h1>Page 1</h1>
</div>
<div data-role="content">
Place content here
// i tried this too but didnt receive at the pagecreate of pge 1
<a href="#page2?val=1" data-role="button">Send Value</a>
</div>
<div data-role="footer">
<h1>Footer</h1>
</div>
</div>
<div id="page2" data-role="page" data-add-back-btn="true">
<div data-role="header">
<h1>Page 2</h1>
</div>
<div data-role="content">
Place content here
</div>
<div data-role="footer">
<h1>Footer</h1>
</div>
</div>
</body>
</html>
Ok, it looks like jqm does not support this:
However, their documentation offers to plugins that may help you:
Found in the section called “Passing parameters between pages” here: http://jquerymobile.com/test/docs/pages/page-scripting.html