Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<head>
<title>Untitled</title>
</head>
<Script language="Javascript">
var isIE4;
var isNS4;
function getRef(id)
{
if (isIE4) return document.all[id];
if (isNS4) return document.layers[id];
}
function initPage()
{
//- Détection du browser -//
isIE4 = ((document.all ) ? true : false);
isNS4 = (document.layers ? true : false);
var width = getRef("toto").width;
var height=getRef("toto").height;
if (width > height) alert("landscape");
else alert("portrait");
return true;
}
</Script>
<BODY onload="initPage();">
<img id="toto" src="valeur.jpg" border="0">
</BODY>
</html>
toto.gif|L
tutu.gif|P
anotherone.jpg|L
[code]
Then you open this file in ASP and read it to determine if your picture is portrait (2nd param to P) or landscape (2nd param to L) Water is not bad as soon as it stays out human body ;-)