Professional Documents
Culture Documents
MKM cloth collections is a newly opened textile store. They have their own website from where one can order
their cloths online. As part of their business process, they also have a delivery service. The store gets numerous
orders to deliver and processing them manually takes enormous time. Help them to develop a web page to
calculate the total cost (along with the discount) to be paid by a customer on confirming order. On submitting
the details, the message has to be displayed on the same page as shown in the given screenshots.
After giving all relevant details and clicking on CONFIRM ORDER button :
Use the Label Name and the Component Id as given. All the necessary attributes for the Components should
be given. The Component Id should be specified for each HTML Component. If the Component Id is not
provided for an HTML component, marks will not be provided for that component. All Tags, Elements and
Attributes should conform to HTML5 Standards. All the fields are mandatory.
Note: Fill in the style tag so as to have the given styles applied to the components.
(Do not use Inline CSS and shorthand styling)
3 Use JavaScript Use JavaScript for displaying the bill amount details:
for displaying
the bill details When the valid values are entered and the “CONFIRM ORDER” button is clicked,
the bill amount should be displayed as follows:
“Your order has been successfully placed and you need to pay Rs. totalDressCost”
in a div tag with id as “result”.
If the coupon code chosen is MKM0707, then provide a 25% discount from the
total price.
If the coupon code chosen is MKM553P, then provide a 20% discount from the
total price.
If the coupon code chosen is MKM859L, then provide a 10% discount from the
total price.
Formula:
dressCost=price*quantity
discountPrice=dressCost*(discountPercentage/100)
totalDressCost=dressCost-discountPrice
Example: If 2 cloths worth Rs. 4000 is selected and if the coupon code chosen is
MKM859L, then
dressCost=4000*2
discountPrice=8000*(10/100)
totalDressCost=8000-800 = Rs. 7200
Note:
Use the getElementById() function to retrieve the values.
Use Math.round() on the final result to get a rounded value.
In Javascript, please do not use “let”. Instead, use “var”.
4 form Tag The form Tag is already given in the code template. Do not change the code
with attribute template and do the coding as per the requirements and specification.
onsubmit
Make sure that the onsubmit attribute in the form tag invokes the JavaScript
function like "return display()". Also ensure that the “return false;” statement
should be the last line of the JavaScript function “display()”.