Sorry, I haven't explained my problem more clearly.
The problem arises only if I pass data parameter - without that parameter, everything works fine. I'm not using server. I've change my example a little bit. In the code above, after button was clicked (in index.html site) I want to make transition to another page (hello.html) trying to pass some data.
index.html:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<script src="js/purl.js"></script>
<title>Index Site</title>
</head>
<body>
<script type="text/javascript">
document.addEventListener('deviceready', onDeviceReady, false);
function onDeviceReady() {
$.support.cors = true;
$.mobile.allowCrossDomainPages = true;
}
</script>
<div data-role="page" id="indexPage">
<div data-role="content">
<a href="#" id="changePage" data-role="button">Change page</a>
<script type="text/javascript">
$("#changePage").click(function (e) {
e.preventDefault();
$.mobile.changePage("hello.html", {
data: { param : "value" }
});
});
</script>
</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
</body>
</html>
hello.html:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Hello World</title>
</head>
<body>
<div data-role="page" id="helloPage">
<div data-role="content">
<!-- TODO: read passed parameterss -->
Hello!
</div>
</div>
</body>
</html>
I just wonder if that issue may be related with platform - I use jQuery Mobile to develop my PhoneGap application on Windows Phone, but I couldn't find any related problems. Without passing parameters between pages I have to keep them in storage in order to read them after the destination page is loaded. That's not the most convenient way to pass parameters for me. Or maybe there's no better way?