Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2
authorDennis Schafroth <dennis@indexdata.com>
Thu, 10 Nov 2011 10:55:16 +0000 (11:55 +0100)
committerDennis Schafroth <dennis@indexdata.com>
Thu, 10 Nov 2011 10:55:16 +0000 (11:55 +0100)
www/iphone/example_client.js
www/iphone/go.html
www/iphone/index.html

index fb42b3f..18feaa9 100644 (file)
@@ -57,7 +57,7 @@ function loginFormSubmit() {
        authCb, authCb);
 }
 
-function handleKeyPress(e, formId, focusId)  
+function handleKeyPress(e)  
 {  
   var key;  
   if(window.event)  
@@ -67,10 +67,10 @@ function handleKeyPress(e, formId, focusId)
 
   if(key == 13 || key == 10)  
   {  
-      onFormSubmitEventHandler();
-      focusElement = document.getElementById(focusId);
-      if (focusElement)
-         focusElement.focus();  
+      button = document.getElementById('button');
+      button.focus();
+      button.click();
+
       return false;  
   }  
   else  
index 1fd9880..678e2b0 100644 (file)
   
     if(key == 13 || key == 10)  
     {  
-      document.forms[0].submit()  
-      document.getElementById('testLink').focus();  
+      //document.forms[0].submit();
+      button = document.getElementById('button');
+      button.focus();
+      button.click();
+  
+  
       return false;  
     }  
     else  
@@ -30,7 +34,8 @@
          onKeyPress="return handleKeyPress(event)"  
           maxlength="100"  
                    value="" />  
+      <input id="button" type="submit" value="go" />
       <a href="#" id="testLink"></a>  
     </form>  
   </body>  
-</html>  
\ No newline at end of file
+</html>  
index dd565de..c12bac1 100644 (file)
@@ -55,7 +55,7 @@
 -->
      <td width="100%">
       <form id="searchForm" name="search" style="display: none">
-       <input id="query" type="text" onKeyPress="return handleKeyPress(event, 'searchForm')" />
+       <input id="query" type="text" onKeyPress="return handleKeyPress(event)" />
        <input id="button" type="submit" value="go" /><a id="hidden" href=""></a>
       </form>
      </td>