Q:

How to trigger an auto suggest in others selection

I have two autosuggest using jquery which triggers on enter key .  Code is follows
$("#Patient").autocomplete({
                search: function (event, ui) {
                    var key = CheckBrowser(event);
                    if (key == 13)
                        return true;
                    else
                        return false;
                },
                source: function (request, response) {
                    $.ajax({
                        url: '@Url. Action("PatientAutoSuggestByName")',
                        data: { autoSuggestText: request.term }, //
                        dataType: 'json',
                        type: 'POST',
                        success: function (data) {
                            response(data);
                        }
                    });
                },
                select: function (event, ui) {
                    if (SessionExist()) {
                        $('#Patient_ID').val(ui.item ?  ui.item.id : 0);
                        $('#AsterID').val(ui.item ?  ui.item.code : 'Select');
                        $("#VisitNo").focus();
                        $('#VisitNo').trigger("keypress", [13]); // here i want to trigger the second auto suggest
                    }
                }
            });

the second auto suggest is
$("#VisitNo").autocomplete({
                search: function (event, ui) {
                    var key = CheckBrowser(event);
                    if (key == 13)
                        return true;
                    else
                        return false;
                },
                source: function (request, response) {
                    $.ajax({
                        url: '@Url. Action("VisitorAutoSuggest")',
                        data: { patientID: $('#Patient_ID').val(), autoSuggestText: $('#VisitNo').val() }, // 
                        dataType: 'json',
                        type: 'POST',
                        success: function (data) {
                            response(data);
                        }
                    });
                },
                select: function (event, ui) {
                    if (SessionExist()) {
                        $('#Visit_ID').val(ui.item ?  ui.item.id : 0);
                        $('#VisitDate').val(ui.item ?  ui.item.code : 'Select');
                        reloadGrid();
                        GetSettings();
                        $("#Remarks").focus();
                    }
                }
            });

I want to trigger the second auto suggest on the selection of first.  I tried $('#VisitNo').trigger("keypress", [13]);  B'coz the auto suggest is triggerd in enter key.  But this is not working.  If anybody knows the solution please share

A:

as Pitchai Pazhani Said i done this by using search method in the autocomplete. 
$("#VisitNo").autocomplete('search', $("#Patient_ID").val());

