Test of iPhone Go
authorDennis Schafroth <dennis@indexdata.com>
Mon, 7 Nov 2011 10:20:52 +0000 (11:20 +0100)
committerDennis Schafroth <dennis@indexdata.com>
Mon, 7 Nov 2011 10:20:52 +0000 (11:20 +0100)
www/iphone/go.html [new file with mode: 0644]

diff --git a/www/iphone/go.html b/www/iphone/go.html
new file mode 100644 (file)
index 0000000..1fd9880
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">  
+<html>  
+  <head>  
+  <meta name="viewport" content="width=320; user-scalable=no" />  
+  <meta http-equiv="Content-type" content="text/html; charset=utf-8">  
+  <title>Safari Mobile input test page</title>  
+  <script>  
+  function handleKeyPress(e)  
+  {  
+    var key;  
+    if(window.event)  
+      key = window.event.keyCode;  
+    else  
+      key = e.which;  
+  
+    if(key == 13 || key == 10)  
+    {  
+      document.forms[0].submit()  
+      document.getElementById('testLink').focus();  
+      return false;  
+    }  
+    else  
+      return true;  
+  }  
+  </script>  
+</head>  
+<body>  
+  <form action="javascript:alert('search')">  
+      <input type="text"  
+         onKeyPress="return handleKeyPress(event)"  
+          maxlength="100"  
+                   value="" />  
+      <a href="#" id="testLink"></a>  
+    </form>  
+  </body>  
+</html>  
\ No newline at end of file