sostituisci
codice:
data: "search=" + str + "&string=" + str2,
con
codice:
   data:
   {
    search :  str,
    string : str2
  },