title: Script loads only first function for 2 different inputs instead of loading them sepparately
body: <p>This is 2 different functions for 2 inputs - inputStringVga and inputStringCpu, however it always loads only the first function, even then 2 inputs have different ID (inputStringVga and inputStringCpu) Why it's so? And how to make them load their function instead of loading only first function query ?</p>
  
  <pre><code>function lookup(inputStringVga) {
      if(inputStringVga.length == 0) {
          $('#suggestions').fadeOut(); // Hide the suggestions box
      } else {
          $.post("rpc.php", {queryStringVga: ""+inputStringVga+""}, function(data) { // Do an AJAX call
              $('#suggestions').fadeIn(); // Show the suggestions box
              $('#suggestions').html(data); // Fill the suggestions box
          });
      }
  }
  function lookup(inputStringCpu) {
      if(inputStringCpu.length == 0) {
          $('#suggestions').fadeOut(); // Hide the suggestions box
      } else {
          $.post("rpc.php", {queryStringCpu: ""+inputStringCpu+""}, function(data) { // Do an AJAX call
              $('#suggestions').fadeIn(); // Show the suggestions box
              $('#suggestions').html(data); // Fill the suggestions box
          });
      }
  }
  </code></pre>
  
  <p>rpc.php file</p>
  
  <pre><code>$querystring = JRequest::getVar('queryStringCpu');
      if(isset($querystring)) {
  if(strlen($querystring) &gt;0) {
  
      $query = "SELECT cpuname FROM #__cpu WHERE cpuname LIKE '%" . $querystring . "%' ORDER BY cpuname LIMIT 50";
      $db-&gt;setQuery( $query );
      $db-&gt;query( $query ) or die('Blogai');
      $qq = $db-&gt;loadObjectList();
  
      foreach ($qq as $aa) {
      echo '&lt;div class="aa"&gt;'.$aa-&gt;cpuname.'&lt;/div&gt;';
          }
      }
  }
  $querystring2 = JRequest::getVar('queryStringVga');
  
      if(isset($querystring2)) {
  if(strlen($querystring2) &gt;0) {
  
      $query2 = "SELECT vganame FROM #__cpu WHERE vganame LIKE '%" . $querystring2 . "%' ORDER BY vganame LIMIT 50";
      $db-&gt;setQuery( $query2 );
      $db-&gt;query( $query2 ) or die('Blogai');
      $qq2 = $db-&gt;loadObjectList();
  
  foreach ($qq2 as $aa2) {
      echo '&lt;div class="aa1"&gt;'.$aa2-&gt;vganame.'&lt;/div&gt;';
          }
      }
  }
  </code></pre>