It is not necessary to have any technology on the server. It is perfectly possible to do a simple search with Javascript.
Search only with jQuery
I made an example using jQuery. The first thing is to have a table with the names and the phones. In my example I did so:
<table id="lista">
<thead>
<tr>
<th><div>Nome</div><div><input id="filtro-nome"/></div></th>
<th>Telefone</th>
<th>Ramal</th>
</tr>
</thead>
<tbody>
<tr>
<td>Ana</td>
<td>3333-3333</td>
<td>123</td>
</tr>
<tr>
<td>João</td>
<td>3333-3333</td>
<td>123</td>
</tr>
<tr>
<td>Luiz</td>
<td>3333-3333</td>
<td>123</td>
</tr>
<tr>
<td>Mário</td>
<td>3333-3333</td>
<td>123</td>
</tr>
<tr>
<td>Rodrigo</td>
<td>3333-3333</td>
<td>123</td>
</tr>
<tr>
<td>Silvana</td>
<td>3333-3333</td>
<td>123</td>
</tr>
</tbody>
</table>
Note that I have placed a search field in the header.
With this we can make a script that runs when the filter field is changed. For each line it checks whether the filter matches the name and hides or displays the line as appropriate. Consider the code below:
$('#filtro-nome').keyup(function() {
var nomeFiltro = $(this).val().toLowerCase();
$('table tbody').find('tr').each(function() {
var conteudoCelula = $(this).find('td:first').text();
var corresponde = conteudoCelula.toLowerCase().indexOf(nomeFiltro) >= 0;
$(this).css('display', corresponde ? '' : 'none');
});
});
Search only with Javascript "pure"
Since you can’t install a server, it can be easier to distribute HTML without any dependencies. Thinking about it, I made a version that doesn’t depend on a library like jQuery;
var filtro = document.getElementById('filtro-nome');
var tabela = document.getElementById('lista');
filtro.onkeyup = function() {
var nomeFiltro = filtro.value;
for (var i = 1; i < tabela.rows.length; i++) {
var conteudoCelula = tabela.rows[i].cells[0].innerText;
var corresponde = conteudoCelula.toLowerCase().indexOf(nomeFiltro) >= 0;
tabela.rows[i].style.display = corresponde ? '' : 'none';
}
};
I would leave the data in a javascript variable even, one in a json. XML will only complicate things. Having the data, the boring part will be dealing with accented characters in the search. See related question: http://answall.com/questions/3994/comort-fazer-uma-busca-ignorando-acentuaca-em-javascript
– bfavaretto