<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Orientation</title>
<meta name = "viewport" content="width=320, user-scalable=0"/>
<script type="text/javascript" language="javascript">
function updateOrientation()
{
var displayStr = "Orientation : ";
switch(window.orientation)
{
case 0:
displayStr += "Portrait";
break;
case -90:
displayStr += "Landscape (right, screen turned
clockwise)";
break;
case 90:
displayStr += "Landscape (left, screen turned
counterclockwise)";
break;
case 180:
displayStr += "Portrait (upside-down
portrait)";
break;
}
document.getElementById("output").innerHTML =
displayStr;
}
</script>
</head>
<body onorientationchange="updateOrientation();">
<div id="output"></div>
</body>
</html>
On Jun 19, 7:50 am, London iPhone Dev <[email protected]> wrote:
> Hey Guys.
>
> I've come to believe I cannot disable accelerometer on an iPhone site.
>
> Have a look at the current build of my iPhone
> site:http://www.urbanviolet.com/iphonejava2/sprytest.html
>
> Good right?
>
> I need to tell the user when orientation is landscape "This site has
> been formatted to fit your iPhone in the vertical orientation. Please
> rotate your iPhone vertically to continue."
>
> This has been done already here:http://www4.popcap.com/iphone/games/bejeweled/
>
> Could anyone save me? - I've come so far with the build of the site
> and I've hit a brick wall! we all know what its like.
>
> Many Thanks,
>
> Ross Butler
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---