I have array like this... I am fetching the values in the array
format...

in search.php page, if i dont have any values in this array
how can i show the Message "There is no value"; in autocomplete in
jquery..

Here is the Jquery code:

$("#patientsearchresults").autocomplete("/SSHD/patientsearch/
controller/PatientSearchController.php?action=patientSearch", {
                formatItem: function(row) {
                row = eval("(" + row + ")");
                        return row['PatientLastName'] + ", "+ 
row['PatientFirstName'] + " "
+ row['DateOfBirth'];
        },
                formatResult: function(row){

                        row = eval("(" + row + ")");
                        row = row['PatientLastName'] + ", "+ 
row['PatientFirstName'];
                }
        }).result(function(event, row) {
                row = eval("(" + row + ")");
                location.href = "/SSHD/patientchart/PatientChartHome.php?
PatientUUID=" + row.PatientUUID;
        });



PHP code :

 foreach($arrSearchResults as $row) {
      echo json_encode($row);
      echo "\n";
  }


I want to show a message in the autocomplete ... Message like this
"There is no values for the search query"...

Reply via email to