Ok so i'm going to try and be as descriptive as possible for this issue is extremely challenging for me to resolve.

I am creating an auto suggest search feature and I decided to do it in OOP.

My current set up is like this...

Code JavaScript:
function associate_search(){
     this.autosuggest_result = autosuggest_result;
     this.fill_list                  = fill_list;
     function autosuggest_results(info) { // info is the value of the search field
            ajax.get('/assets/ajax/associates_search.php?info=' + info + '&sid=' + hex_md5(sess_id()) + '&list=' + with_u_list, function(resp)
                   var search 	= eval('(' + resp + ')');
                   if(search.length > 0){
     function fill_list (search_data){
            // processes the data into arrays and creates the searchable elements
           var search = search_data;
           return search
var associate_search	= new associate_search;

In a different file, I am trying to display the returned data in my console by doing this but it shows up undefined.

Code JavaScript:
with_field.onkeyup = function(event)
        var test = associate_search.autosuggest_results(with_field.value);

Am I returning the value in the wrong way?