Table with select form
Table with select form
Hi,
here is my code:
Javascript:
$(document).ready(function() {
$('#example').DataTable( {
"ajax": '../ajax/data/arrays.txt'
} );
} );
HTML
<select id="office-select" name="idOffice">
<option value="">All</option>
<option value="1">Berlin</option>
<option value="2">New York</option>
<option value="3">Tokio</option>
</select>
Name | Position | Office | Extn. | Start date | Salary |
---|---|---|---|---|---|
Name | Position | Office | Extn. | Start date | Salary |
After I choose office (for example New York) from select form, I want to dynamically reload the content of the table from file '../ajax/data/arrays.txt?idOffice=2'
How can I do it? Thank you very much