title: How to pass a value from default.php to view.html.php through ajax - joomla3.x
body: <p>I want to pass a value to view.html.php from default.php.</p>
  
  <p>This is in Joomla 3.x</p>
  
  <ul>
  <li>folder/tmpl/default.php</li>
  <li>folder/view.html.php</li>
  </ul>
  
  <p><strong>default.php</strong></p>
  
  <pre><code>&lt;input placeholder="Enter a value" type="text" id="field-5" &gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
     $("#field-5").keyup(function (e) { 
        var exam = $(this).val(); 
        $.post('http://localhost/folder/folder/folder/folder/folder/view.html.php', {'value':exam});  
     });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>view.html.php</strong></p>
  
  <pre><code>$value = $_REQUEST['value'];
  echo $value;
  </code></pre>
  
  <p>i need that $value for filtering a data table, i dont know if this is working or this the right code, or its just i need to refresh my data table and i dont know how.</p>
  
  <p>Thanks in advance.</p>