Note that there are some explanatory texts on larger screens.

plurals
  1. POajax and js works in chrome but dont works correctly in mozilla and IE (codeigniter)
    primarykey
    data
    text
    <p>im doing autocomplete system in my website with codeigniter. But i have problems. I can do this works in Chrome, but in mozilla and IE dont works. For example, in chrome open the itens of result them query in dropdown list, and the mozilla and IE appears "2 results are available, use up and down arrow keys to navigate." Verify screenshots</p> <p>The View (autoComplete_v.php): </p> <pre><code> &lt;head&gt; &lt;link href="../../css/ui-lightness/jquery-ui-1.10.3.custom.css" media="screen" type="text/stylesheet" rel="stylesheet" /&gt; &lt;/head&gt; &lt;body&gt; &lt;form&gt; &lt;label for="search"&gt;Search&lt;/label&gt; &lt;input id="search" type="text"/&gt; &lt;input id="hiddenurl" type="hidden"&gt; &lt;input type="submit" value="submit"/&gt; &lt;/form&gt; &lt;script src="&lt;?php base_url();?&gt;../../js/jquery-1.9.1.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="&lt;?php base_url();?&gt;../../js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="&lt;?php base_url();?&gt;../../js/autocomplete.js" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p>The js file (autocomplete.js):</p> <pre><code>$(document).ready(function(){ $('#search').keypress(function(e){ if(e.which == 13) { e.preventDefault(); } var searched = $('#search').val() var fullurl = $('#hiddenurl').val() + '../autoComplete_c/getResult/' + searched $.getJSON(fullurl,function(result){ //display suggestion code goes here var elements = []; $.each(result, function(i, val){ elements.push(val.referencia) }) $('#search').autocomplete({ source : elements }) }) }); }); </code></pre> <p>The controller (autoComplete_c.php):</p> <pre><code>public function getResult($referencia){ if(!empty($referencia) || isset($referencia)) { $this-&gt;db-&gt;select('referencia'); $this-&gt;db-&gt;like('referencia', $referencia); echo json_encode( $this-&gt;db-&gt;get('produto_servico_tbl')-&gt;result()); } } </code></pre> <p>Chrome: <img src="https://i.stack.imgur.com/ScpZ9.png" alt="enter image description here"></p> <p>Mozilla and IE:</p> <p><img src="https://i.stack.imgur.com/ZQs5f.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload