i need help creating an pplication to calculate flooring costs. The application should allow the user to enter the room length and width in metres, and select a type of flooring from a set of radio buttons (see Figure 1). The program should include the costs for the different types of flooring available. The flooring comes in packs which each cover 2m2. The price per pack is as follows: Beech £25 Maple £30 Tile £20 Laminate £10 When the user clicks on the “Calculate cost” button the program should validate the input (see below) and display a quotation, suitably formatted, which includes • the type of flooring required • the width and length required, and the floor area (length x width) in m2 • the number of 2m2 packs required to cover this area • the total cost of the packs required Note: each pack covers 2m2 and the user will need to purchase sufficient packs to cover the specified floor space. Before performing the calculation, the application should validate the data entered, ensuring that: • The length or width fields are not blank • The length and width entered are valid numbers (do not contain letters or other characters) • The length and width entered are within the range 1m - 50m inclusive • A flooring type is selected If any of these conditions are not met, the application should display an appropriate message (see below for examples), and not go on to perform the calculation. i also need it to that keep a record of all quotations made. Bargain Flooring plans to use this information to identify which flooring types are most popular. For each quotation the flooring type, length and width, needs to be stored in appropriate variables or a data structure. The storage of several quotations will require the use of either an array or a collection. An example of the data that needs to be stored for a quotation: Flooring Type: Beech Length: 5.5 Width: 6 Note: There is no need to store the total size or number of packs as this can be calculated from the data. At any time, the user can click a button to view a summary report containing the following: • A table containing a summary of each quotation made (flooring type, length, width, number of packs and total cost) • • The number of quotations and their total cost • • The total amount of flooring (in packs) quoted by flooring type
Is this homework?
Codeigniter has a handy validation class. In addition to this I would use a libray such as jsparsely to parse the data with ajax.
'something has gone wrong' is unhelpful. Please can you be a little more specific.
well the application doesn't run anymore, and doesn't output anything
In google chrome rightclick ->inspect element ->console
this will flag up any js issues. At a glance line 100 is missing a semicolon.