Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: search form

  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts

    search form

    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.

    Thanks

  • #2
    New Coder
    Join Date
    Jul 2006
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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?

    Code:
    <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>
    </DIV>
    <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>
    <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">
    </select>
    <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>
    <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>
    </DIV>
    <INPUT type="submit" name="" value="GO" style="position:absolute;left:36px;top:379px;width:26px;height:24px;z-index:19">

  • #3
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,518
    Thanks
    3
    Thanked 506 Times in 493 Posts
    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
    http://www.vicsjavascripts.org.uk/Fo...endium.htm#f14

    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
    __________________
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

  • #4
    New Coder
    Join Date
    Jul 2006
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,518
    Thanks
    3
    Thanked 506 Times in 493 Posts
    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?
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •