Skip to main content
edited tags
Link
Natrium
  • 31.3k
  • 19
  • 62
  • 79
formated code
Source Link
Pascal MARTIN
  • 401.8k
  • 82
  • 665
  • 666

I am using the below jquery code to call a ajax function in my contorller CS. Search is the function name. How ever the function is called in the controller. But i am supposed to get a value in the text box of the page inside this function. Basically this is for the auto complete feature. on key up the function is called. But i am not able to get the value in the textbox to do a relavent search. please reply back anything you feel would be helpful to me. Thanks in advance.

$(document).ready(function(){ $("#searchusers").autocomplete("http://localhost/CS/index.php/search" , { width: 500, selectFirst: false });

}); $(document).ready(function(){ $("#searchusers").result(function(event, data, formatted) { if (data) $(this).parent().next().find("input").val(data[1]); }); $('#set1 *').tooltip(); $('#firstname').tooltip();

});

$(document).ready(function(){
    $("#searchusers").autocomplete("http://localhost/CS/index.php/search" , {
        width: 500,
        selectFirst: false
    });
    
});
$(document).ready(function(){
    $("#searchusers").result(function(event, data, formatted) {
        if (data)
            $(this).parent().next().find("input").val(data[1]);
    });
    $('#set1 *').tooltip();
    $('#firstname').tooltip();

});

I am using the below jquery code to call a ajax function in my contorller CS. Search is the function name. How ever the function is called in the controller. But i am supposed to get a value in the text box of the page inside this function. Basically this is for the auto complete feature. on key up the function is called. But i am not able to get the value in the textbox to do a relavent search. please reply back anything you feel would be helpful to me. Thanks in advance.

$(document).ready(function(){ $("#searchusers").autocomplete("http://localhost/CS/index.php/search" , { width: 500, selectFirst: false });

}); $(document).ready(function(){ $("#searchusers").result(function(event, data, formatted) { if (data) $(this).parent().next().find("input").val(data[1]); }); $('#set1 *').tooltip(); $('#firstname').tooltip();

});

I am using the below jquery code to call a ajax function in my contorller CS. Search is the function name. How ever the function is called in the controller. But i am supposed to get a value in the text box of the page inside this function. Basically this is for the auto complete feature. on key up the function is called. But i am not able to get the value in the textbox to do a relavent search. please reply back anything you feel would be helpful to me. Thanks in advance.

$(document).ready(function(){
    $("#searchusers").autocomplete("http://localhost/CS/index.php/search" , {
        width: 500,
        selectFirst: false
    });
    
});
$(document).ready(function(){
    $("#searchusers").result(function(event, data, formatted) {
        if (data)
            $(this).parent().next().find("input").val(data[1]);
    });
    $('#set1 *').tooltip();
    $('#firstname').tooltip();

});
Source Link
Vinod
  • 33.1k
  • 35
  • 100
  • 119

Ajax call to php function in a controller.

I am using the below jquery code to call a ajax function in my contorller CS. Search is the function name. How ever the function is called in the controller. But i am supposed to get a value in the text box of the page inside this function. Basically this is for the auto complete feature. on key up the function is called. But i am not able to get the value in the textbox to do a relavent search. please reply back anything you feel would be helpful to me. Thanks in advance.

$(document).ready(function(){ $("#searchusers").autocomplete("http://localhost/CS/index.php/search" , { width: 500, selectFirst: false });

}); $(document).ready(function(){ $("#searchusers").result(function(event, data, formatted) { if (data) $(this).parent().next().find("input").val(data[1]); }); $('#set1 *').tooltip(); $('#firstname').tooltip();

});