In my app, which is created on a single page template i have a list on page 5, which is created dynamically from a server. This works also fine. However, I want then pass a list value to the next page (page6). For this I created following code. after submit the form, the page 1 is showed instead of page 6. Is there any error in this code?
<script>
$(document).on('pageinit', '#p5', function() {
$('form').submit(function() {
content = $('[name=content]').val();
$.mobile.changePage("#p6");
return false;
});
});
$(document).on('pageinit', '#p6', function() {
$('.ui-content').text(content);
});
</script>