CodeIgniter Forums
Ajax help - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Ajax help (/showthread.php?tid=11034)

Ajax help - El Forum - 08-22-2008

[eluser]Nutan Lade[/eluser]
I am trying to implement an autocomplete field.I am getting the results from the db but I am not able to navigate through the results.And my code is..

    //var url = "http://localhost/Gadgets/index.php/gadgets/searchMovie/"+document.getElementById(movieSearch);
    function ajaxSearchMovie(url){
    new Ajax.Request(url,
    onSuccess: function(transport){
      var response = transport.responseText || "no response text";
      document.getElementById('autocomplete_choices')[removed] = response;
      alert("Success! \n\n" + response);
    onFailure: function(){ alert('Something went wrong...') }

            <td>&lt;input type="text" id="autocomplete" name="autocomplete" autocomplete="off"&gt;&lt;/td>
            <td></div--&gt;<div id="autocomplete_choices" class="autocomplete"></div></td>

Please help me to solve thie problem.What should do after retuurning the results.
Thanq in advance.

Ajax help - El Forum - 08-23-2008

There are libraries that handle AJAX autocomplete pretty well:


Good luck