DBookatay Posted February 5, 2012 Share Posted February 5, 2012 I am in the middle of a complete site redesign and am having some issues. I am self taught, working on my site after hours of my 9-5. What I am trying to do is update my sql search query based on users selections, primarly for options dealing with vehicles in our inventory. By default all vehicles are shown, and as a user unchecks items the results are instantly updated. This is a prime example of what I am looking for: http://www.danbury.mercedesdealer.com/new When you check AMG or Navigation it updates. I am trying to do this to my page: http://www.carcityofdanbury.com/New/?cat=01&do=Search&category=Foreign I have googled everything I can think of and am now stuck... Any help would be greatly apprechiated! Quote Link to comment https://forums.phpfreaks.com/topic/256437-not-sure-if-im-looking-for-an-ajax-script-or-a-jquery-script-please-read/ Share on other sites More sharing options...
AyKay47 Posted February 5, 2012 Share Posted February 5, 2012 Well, the exact method that you will want to use for this will be dependent on your database design and coding setup. However, the basics will consist of an ajax request being sent to the server (I recommend jquery's Ajax API) with the data from the check boxes when a user clicks on a check box which will edit the query in the receiving PHP page and return the results set however you want. Wouldn't it make more logical sense to have all of the check box unchecked which would display all results, then have the user narrow the results by checking a check box? Quote Link to comment https://forums.phpfreaks.com/topic/256437-not-sure-if-im-looking-for-an-ajax-script-or-a-jquery-script-please-read/#findComment-1314655 Share on other sites More sharing options...
DBookatay Posted February 5, 2012 Author Share Posted February 5, 2012 Does anyone know of a good tutorial? Quote Link to comment https://forums.phpfreaks.com/topic/256437-not-sure-if-im-looking-for-an-ajax-script-or-a-jquery-script-please-read/#findComment-1314778 Share on other sites More sharing options...
DBookatay Posted February 5, 2012 Author Share Posted February 5, 2012 Ok, I found this script: http://www.9lessons.info/2009/08/twitter-like-search-with-jquery-ajax.html and was able to get it to work here: http://www.login.carcityofdanbury.com/passed/test/test.php If I type in a make (eg Honda, Toyota) it displays the results that I have in the db. Now how do I use it with checkboxes instead, and no submit button? Quote Link to comment https://forums.phpfreaks.com/topic/256437-not-sure-if-im-looking-for-an-ajax-script-or-a-jquery-script-please-read/#findComment-1314792 Share on other sites More sharing options...
DBookatay Posted February 7, 2012 Author Share Posted February 7, 2012 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/256437-not-sure-if-im-looking-for-an-ajax-script-or-a-jquery-script-please-read/#findComment-1315319 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.