www.webdeveloper.com
Results 1 to 3 of 3

Thread: hire car

  1. #1
    Join Date
    Feb 2012
    Posts
    3

    hire car

    I want to develop JavaScript application that will match customers with a car from their available rentals. Using an HTML form, the customer will enter details such as first, last names, how many passengers and items of luggage they have, and how long they want to rent for, and the application will feedback to the user telling them which cars match their preferences and the cost of the rental. An image of each matching car should also be displayed.

    I therefore shown in the information below. I already created an array but I don't know how to start. Please can someone help me

    Thanks in advance

    [LIST][*]Car[*]Fuel Consumption (Miles per Gallon)[*]No. Passengers[*]No. Items of Luggage[*]Fuel[*]Transmission[*]Air Conditioning[*]Day Hire [*]Weekend Hire [*]Weekly Hire



    var Peugeot = new Array("41","4","1","Petrol","Manual","No", "20", "90", "125")

  2. #2
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194
    Dear, from where will the data be fed back to the user?
    I think (may be wrong!) you can't do it just using JavaScript!
    You will have to store the data in a database and then based on user input you will have to run an SQL Query and return the result.
    So, to conclude, I would say that you will have to use any server side language viz. PHP, ASP etc. and an SQL viz. MySQL, PostgreSQL etc. along with JavaScript (I could do without it!).
    Let's see if anyone else can throw some light!
    "It will never rain roses: when we want to have more roses, we must plant more roses." - George Eliot

  3. #3
    Join Date
    Feb 2012
    Posts
    3

    javascript

    <!DOCTYPE html>
    <html lang="en">

    <head>
    <title>Car Rental</title>
    <link rel="stylesheet" href="arys.css" />

    <script type="text/javascript">


    var volvo = new Array("13","2","0","Petrol","Semi-automatic","yes", "2000", "3800", "12000")



    function quote(){

    function checkrental(){

    if (document.getElementById('rental').value == 'day'){
    document.getElementById('').src ='car.jpg';
    var Toyota Prius = 6;}

    }// end here checkrental




    }// end main quote function

    checkDay();




    </script>

    </head>


    <body>
    <div id="divwrap">

    <h1>4ways.com</h1>

    <div class="box">




    </div><!-- end class box-->

    <div id="content">



    <div id="box">
    <h2>Hire Car form</h2>
    <form method="post" action="#" onsubmit="alert('no data'); return false;">





    <fieldset>
    <legend>rent</legend><select name="rental" id="rental" onchange="quote()">
    <option value="day">Day</option>
    <option value="weekly">Weekly</option>
    <option value="weekend">Weekend</option>

    </select>
    </fieldset>

    <input type="submit" value="Get a quote" onClick="validator()" class="botton" />
    </form>

    </div>
    <div id="images">
    <img src="" alt="" id="car"
    </div><!--content-->

    <div id ="footer">

    <p> footer</p>
    </div>
















    <div><!-- end div divwrap-->
    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles