View Full Version : search form

02-16-2007, 02:47 PM
Hi all,

I am still very new to coding and need a bit of help and guidance on how to create a search form. I am looking to create something similar to the search facility used on WhatCar.com. I have never created a form / database before so i haven't got a clue where to start. I think from looking at the source on Whatcar that they have used Javascript to code the form which is why i have created the post here, but if i'm wrong i'm sorry and i'll move it to the appropriate thread. If you could point me in the right direction by either explaining what i need to do or supplying me with links on where i can learn how to create such a form i would be very grateful.


02-18-2007, 08:41 PM
I'm still really struggling with this one. My code at the moment is below but i haven't actually started any type of search at the moment as i don't have a clue where to start. For example does all the information go in one file or are there links to other files?

<DIV style="position:absolute;left:17px;top:237px;width:248px;height:19px;background-color:#DC261D;z-index:12" align="center">
<FONT style="font-size:16px" color="#FFFFFF" face="Maiandra GD,Arial,Times New Roman,sans-serif"><B>Latest Car Reviews</B></FONT>
<select name="D1" size="1" style="position:absolute;left:33px;top:294px;width:210px;font-family:MS Shell Dlg,Arial,Times New Roman,sans-serif;z-index:13">
<select name="D1" size="1" style="position:absolute;left:35px;top:330px;width:208px;font-family:MS Shell Dlg,Arial,Times New Roman,sans-serif;z-index:14">
<INPUT type="radio" name="" value="" checked style="position:absolute;left:34px;top:266px;z-index:15">
<INPUT type="radio" name="" value="" style="position:absolute;left:141px;top:264px;z-index:16">
<DIV style="position:absolute;left:53px;top:266px;width:73px;height:16px;z-index:17" align="left">
<FONT style="font-size:13px" color="#000000" face="Maiandra GD,Arial,Times New Roman,sans-serif">New Cars</FONT>
<DIV style="position:absolute;left:161px;top:265px;width:101px;height:16px;z-index:18" align="left">
<FONT style="font-size:13px" color="#000000" face="Maiandra GD,Arial,Times New Roman,sans-serif">Used Cars</FONT>
<INPUT type="submit" name="" value="GO" style="position:absolute;left:36px;top:379px;width:26px;height:24px;z-index:19">

02-18-2007, 09:18 PM
I guess you are refering to the car make and model selection using two select list.

The Javascript is straight forword populating the select lists from arrays

The problem is producing and maintaining the arrays. This would normally be done serverside using a data base.

I am not sure of the size or nature of your requirement. I can supply scripts to populate the select lists but not sure if this level of assistance would be sufficent.

You can look at

to see if it is of any assistance
Note there are many scripts of the type freely avaiable

If you are going to follow up my post, prefer to do it on this forum

02-18-2007, 10:03 PM
Hi Vic thanks alot for your reply.

I must say your site is amazing. How long has it taken you to learn so much about coding?

I really like the look of your f14 Populate Select ListsJavaScript. And this is really what i want my list to look like. In a nutshell, I want something like 20 car manufacturers in the first list. And like your example i want the second list to depend on what you select in the first list. Once the user has selected for example BMW in the first list the second list will show something like 15 makes of car from BMW. Once the user selects there chosen car it redirects them to another page on my site where they can review there chosen car.

02-18-2007, 11:45 PM
The problem is producing and maintaining the arrays. This would normally be done serverside using a data base.

give some thought about the 20 arrays to necessary to support 20 manufactures an what data you require in each array field.

How large are these arrays?

Where are you going to store these arrays? and/or how will you access them?

How do you intend to maintain and update them?

Does each model selection load a separate page?