Jump to content

Not sure if Im looking for an Ajax script or a jQuery script... Please read!


DBookatay

Recommended Posts

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!

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.