javascript - Search button works on simulator but not on device - jQTouch and PhoneGap -


I have set up the original search function within my iPhone app, it works on the simulator, but the app uses the device When doing this, the search button does not do anything when it is tapped. I have tried many things to do work (onsubmit, etc.) but nothing works. Can anyone help?

Here is my search function and form:

  Function recipeAnfo (name, content, url) {this.name = name; this. Content = content; This.url = url; } Var vIngredients = New Array (); Viagredients [0] = New recipe information ("Aki Pasta", "Aki", "ackpast.html"); Viagredients [1] = New recipeAnfo ("Aki and Saltfish", "Aki Saltfish", "Exalt HTML"); Viagredients [2] = New recipeAnfo ("blow chicken", "jerk", "jerkachic"); // Lookup function is made a copy of getData (form) {// text box content var inputText = form.Input.value var list = $ ("# search-results"); List.empty (); // viagents (var i = 0; i & lt; vIngredients.length; i ++) through all the entries for loop (// compare (vIngredients [i] .ings.indexOf (inputText)! = - 1) Add search result and list items tag list in {var found = true; console.log (vIngredients [i] .name); // list.app ($ ("(lt; li class = 'arrow' & gt; & Lt; a href = '#' & gt; "+ vIngredients [i] .name +" & lt; / a & gt; & lt; / li & gt; "));}}} & lt; / script & Lt; form id = "search" action = "" onsubmit = "getData (this.form);" & gt; & lt; ul class = "rounded"> 
  • Input Type = "search" name = "input" placeholder = "search ..." onkeydown = "if (event.keyCode == 13) getData (this.form)" & gt; & lt; / li & gt; & Lt ; / Ul & gt; & lt; ul class = "edgetoedge" id = "result" & gt; & lt; li class = "sep" & gt; Results & lt; / li & gt; & lt; / ul & gt; & Lt; ul class = "edgetoedge" id = "search-results" & gt; & lt; / ul & gt; & lt; / form & gt;

    It is to be mentioned that the only reason for working on the simulator is that: onkeydown = "If (event.keyCode == 13) getData (this.form)" removing it stops working in this simulator.

    Apple "fixed" it's in iOS 4.2. For incidents occurring onsite to a form, there should be an input tag with type = "submit".

  • Comments