title: Ajax multiple value
body: <p>Did anyone know how i can send all this stuff with ajax to a search.php? it is already working but only with a search bar. I want to add to the search bar these variables. Its only important for the sort variable(the div with the sort id) to send the data on the beginning.
  i think it would work to save the var into divs and get the values with <code>document.getElementById('').getAttribute('value')</code> but i still need to find out how to add this line of code to this ajax and that the ajax constantly check for changes in this divs. i still want that the ajax file send a output before i even touched the searchbar and the divs</p>
  
  <pre><code>$(document).ready(function(){
      load_data();
      function load_data(query)
      {
          $.ajax({
              url:"search.php",
              method:"post",
              data:{search:query},
              success:function(data)
              {
                  $('#result').html(data);
              }
          });
      }
  
      $('#search_text').keyup(function(){
          var search = $(this).val();
          if(search != '')
          {
              load_data(search);
          }
          else
          {
              load_data();            
          }
      });
  });
  </code></pre>
  
  <pre><code>
  function gettagValue() {
      var checks = document.getElementsByClassName('tag');
      var strtag = '';
  
      for ( i = 0; i&lt;checks.length; i++) {
          if ( checks[i].checked === true ) {
              str += checks[i].value + "#";
          }
      }
      alert(strtag);
  }
  </code></pre>
  
  <pre><code>
  function getblacklistValue() {
      var checks = document.getElementsByClassName('blacklist');
      var strblacklist = '';
  
      for ( i = 0; i&lt;checks.length; i++) {
          if ( checks[i].checked === true ) {
              strblacklist += checks[i].value + "#";
          }
      }
      alert(strblacklist);
  }
  </code></pre>
  
  <pre><code>
  function getbrandValue() {
      var checks = document.getElementsByClassName('brand');
      var strbrand = '';
  
      for ( i = 0; i&lt;checks.length; i++) {
          if ( checks[i].checked === true ) {
              strbrand += checks[i].value + "#";
          }
      }
      alert(strbrand);
  }
  </code></pre>
  
  <pre><code> alert(document.getElementById('sort').getAttribute('value'));
  </code></pre>