How change page with javascript?
Hello, i'm Daniel from Mendoza, Argentina.
I have one multipage site. I want to load an internal page from a function.
....
function test(){
if ($("id").val()==1) {
//load page2
????????????????????????????
}else{
alert('Error');
}
....
<div data-role="page" id="page">
<div data-role="header" data-position="fixed">
<h1>Simulador AVL</h1>
</div>
<div data-role="content">
<div id="controles">
<input type="text" name="ip" id="id" />
</div>
</div>
<a href="" data-role="button" id="btnpos" onclick="test();">test</a>
</div>
</div>
<div data-role="page" id="page2">
<div data-role="header" data-position="fixed">
<h1>Test- Page 2</h1>
</div>
<div data-role="content">
hi!
</div>
</div>