Forums

This topic is locked

filter data

Posted 14 May 2008 18:14:42
1
has voted
14 May 2008 18:14:42 preea kapoor posted:
hi!!
i have a jsp page where on click on a button a new window gets opened up which contains data retieved from the database. also there is a text box on top with label where if user enters any character then corresponding to that character the data should get filtered in that table. eg:
on the index.jsp there is a button which if clicked by the user resutls in the pop up of the child window which contains data retrieved from the database.

<input type="text" name="text">(text box on the child window)
|------------------|
S.No. CityName
1 Delhi
2. Mumbai
3. Jaipur
5. Jodhpur
6. kolkata
(all these values are stored in the database and retrieved in a query) now my requirement is that if user enters J then all the cities starting with J should get displayed on the same page. I am using ajax for this but i need a javascript solution for doing this.

output should be:

S.No. CityName
3. Jaipur
4. Jodhpur

please help how to go about solving this problem.thanks in advance

Preea

Reply to this topic