I am calling two HTML files from JavaScript function I want that when iPad is in portrait mode it should load portrati.html
and in landscapde mode it should open ladnscape.html
Using following code it works on browser when we load first time but when we change orientation it does not change the file.
<SCRIPT language="JavaScript">
if(window.innerHeight < window.innerWidth){
window.location="Landscape/index.html";
}
else if (window.innerHeight > window.innerWidth){
window.location="Potrait/index.html";
}
</SCRIPT>