Forum Moderators: coopster

Message Too Old, No Replies

PHP / Ajax / MYSQL Search Form

         

adammc

2:43 am on Oct 24, 2007 (gmt 0)

10+ Year Member



Hi Guys,

I am trying to develop a search form for my clients website similiar to this:
<snip>

I have a db table of all the Australian Suburbs.
I have a db table of listings categories.
My Listings (what is searched on) contain a category, postcode and suburb row in the listings table in the DB.

I aim to have the following on the search form:
* Input box where the user types in surburbs seperated by commas.
* Combo select box with categories (pulled from db)
* Dropdown list of categories (pulled from DB)

Users would need to be able to have multiple choices for the category combo box and category input box.

How would I begin to create the ajax type style functionality for my search form as found on the link above?

Any help would be greatly appreciated :)

[edited by: eelixduppy at 3:26 am (utc) on Oct. 24, 2007]
[edit reason] no URLs, please [/edit]

phparion

3:58 am on Oct 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



we cant see the link you had posted :-s

adammc

6:24 am on Oct 24, 2007 (gmt 0)

10+ Year Member



hmmm.. I arent allowed to post a link. Not sure if i can explain it in words....

When a user starts typing letters to spell out a city in the input box, the combo select box below it which contains the city names fromn the database cycles through in real time allowing the user to click on a city that matches his half spelt city name that he was typing in the input box.

I hope that kinda makes sense?

cameraman

7:48 am on Oct 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What you're describing doesn't need ajax if the combo box is already loaded with the candidates - it's just straight javascript. You can probably see how it's done by looking at the javascript that's attached to the page you tried to post.

If you need to use an ajax request to get the info from your server, download the yahoo gui widget library - they've got an example of it there.