how to filter the content of a list box based on a text box value
i am developing a web page in which i have following elements
1) a list box contains the list of files.
2) a text box
3) a button
by default list box contains a list of files say
when the user enters a particular pattern in the text box say (2013) and clicks the button, then the list box contents should be filtered and the list box should only contain the files containing 2013 in its name
so after user enters 2013 in text box and xlicks the button, the list box should now contain olny
so, can anyone tell me how can i do this.. please give me a code to do this.. its urgent need.