Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
Hiding specific results from a query

 
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help
View previous topic :: View next topic  
Author Message
idy
New one
New one


Joined: 12 Sep 2006
Posts: 1

PostPosted: Tue Sep 12, 2006 12:36 pm    Post subject: Hiding specific results from a query Reply with quote

Hello to you all !

I would need your advice and suggestions on how to build the following code. Please note that I am not specifically asking for the full code (!) but I am struggling to get the concepts all perfectly right.

1. The user enters keywords in a search bar. That's easy ;
2. The corresponding data is retrieved from a database (MySQL) through a standard PHP query. That's OK for me ;
3. Now imagine there is a checkbox next to the search bar, allowing the user to filter the results in step 2 according to the checkbox's criteria. How can I automatically hide or highlight the filtered results without making a new query and without reloading the whole page ? I guess there is some javascript / ajax trick there...

In detail :

[1] Table contents :
Column A | Column B
car | blue
car | red
car | blue
truck | blue
truck | red
truck | green

[2] Search bar : looks into column A, and displays results in the following format :
if "car" is sought for :
car | blue
car | red
car | blue

[3] Now imagine there is a checkbox beneath the search bar, allowing the user to select a colour between red, blue and green (or a combination if more than one checked). I have tried to give the same ID (=colour) for each row returned in [1], and then put nothing in the div when a checkbox was unchecked. However, this does not work out (only the first match is hidden) because IDs are unique. Please remember I am trying to automatically update the results table without refreshing the whole page.

Thanks a lot for your help in step [3].
________
how to love
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 Advertisements
 XML & Copyright Notice 
    


Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X


Link to our site:

  


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos


Normal Bookmark


Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax


Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?


Credits:
it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert