Hey there! I’m trying to create a mobile using HTML and JSON. Any help would be much appreceiated.
A REST API has been prepared to facilitate the management of MegaMax Sales, so that you do not have to worry about the storage of data. What you need to do is to make use of the API to implement the required functional requirements.
Need to make a JSON file that uses the HTML provided to complete the FR's
The Functional Requirements (FR) for this app are as follows:
FR1 The app should make an order as if the salesperson is at a client site with a valid OUCU and password for the salesperson and the client id:
FR1.1 Validating the OUCU starts with a letter and ends with a number.
FR1.2 Navigating the widgets catalogue (with Previous and Next buttons) and display of widget images, in addition to the description and asking price.
FR1.3 Adding the currently displayed widget to the order items, including the amount and the agreed price.
FR1.4 Displaying the sum of ordered items including VAT at a rate of 20%.
FR1.5 The order is saved to the web service.
FR2 For the salesperson to review their performance:
FR2.1 Displaying a Map for the area around the current location of the salesperson when placing or viewing an order.
FR2.2 When clicking on Begin Order to start an empty order, displaying the orders along the day’s journey with markers, where the location of clients’ addresses is used to place the marker.
HTML Code Below:
<html>
<head>
<meta name="format-detection"
content="telephone=no">
<meta
name="msapplication-tap-highlight" content="no">
<meta name="viewport"
content="user-scalable=no, initial-scale=1, maximum-scale=1,
minimum-scale=1, width=device-width">
<meta
http-equiv="Content-Security-Policy" content="">
<link rel="stylesheet"
href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"/>
<script
src="http://code.jquery.com/jquery-3.5.1.min.js"></script>
<script
src="https://js.api.here.com/v3/3.1/mapsjs-core.js"
charset="utf-8"></script>
<script
src="https://js.api.here.com/v3/3.1/mapsjs-service.js"
charset="utf-8"></script>
<script
src="https://js.api.here.com/v3/3.1/mapsjs-ui.js"
type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet"
type="text/css" href="https://js.api.here.com/v3/3.1/mapsjs-ui.css"
/>
<script
src="https://js.api.here.com/v3/3.1/mapsjs-mapevents.js"
type="text/javascript" charset="utf-8"></script>
<title>MegaMax
Sale</title>
</head>
<body>
<div
class="app">
<h1>MegaMax Sale</h1>
<div>
<!-- Question 1
-->
<label>ID:</label>
<input type="text"
name="id">
<label>Password:</label>
<input type="text"
name="password">
<br>
<label>Client:</label>
<input type="number"
name="client">
<button
type="button" onclick="controller.beginorder()">Begin
Order</button>
<br>
</div>
<div>
<!-- Question 2.
Widget navigation buttons -->
<button
type="previous"
onclick="controller.previous()">Previous</button>
<button
type="button"
onclick="controller.next()">Next</button>
<label>Number:</label>
<input type="number"
name="number">
</div>
<div>
<!-- Question 3.
Widget display-->
<label>Price:</label>
<input type="decimal" name="">
<br>
</div>
<div>
<!-- Question 4.
Order navigation buttons and display -->
<button type="button"
onclick="controller.add()">Add to Order</button>
<button type="button"
onclick="controller.end()">End Order</button>
</div>
<!-- Question 5. Map canvas
-->
</div>
<script
type="text/javascript" src="cordova.js"></script>
<script
type="text/javascript" src="js/index.js"></script>
</body>
</html>
Solved 1 Answer
See More Answers for FREE
Enhance your learning with StudyX
Receive support from our dedicated community users and experts
See up to 20 answers per week for free
Experience reliable customer service
Answer : Todo.html <!DOCTYPE> <html><!--Start of html --> <head><!--Start of head --> <title>To-Do List</title> <link rel="stylesheet" href="todo.css"> <!-- link the css file --> <script src="todo.js"></script> <!-- link the js file --> </head> <body onload="disButton()"> <!-- loading disButton function while loading the page --> <!-- Start of todo-in div --> <div class="todo-in"> <div class="row"><h2>New Item</h2></div> <div class="row"> <textarea id="txt" rows="8" cols="40" placeholder="Type New Item" onkeyup="disButton()"> </textarea><!--End of textarea --> </div> <div class="row"> <input type="button" value="Add" id="add" onclick="addItem()"><!-- This button will add item to the table --> </div> </div> <!-- End of todo-in div --> <!-- Start of show div --> <div class="show"> <div class="row"><h2>Item List</h2></div> <div class="row"> <table id="this_table"> <!-- Here Item will be added --> </table> </div> </div><!--End of show div --> </body><!--End of body --> </html><!--End of html --> todo.css var i=0 // this function will add item from textarea function addItem(){ // assigning textarea element in txt txt = document.getElementById('txt'); // creatign date_time object var date_time = new Date(); // assigning table element in tb var tb = document.getElementById('this_table') var tr = tb.insertRow(i); var td1 = tr.insertCell(0); var td2 = tr.insertCell(1); var td3 = tr.insertCell(2); // inserting value of textarea in td1(cell 1) td1.innerHTML = txt.value; // inserting Date and time in td2(cell 2) td2.innerHTML = date_time.toLocaleString(); // inserting delete button in td1(cell 1) td3.innerHTML = "<input type='button' value='delete' onclick='removeItem()'>" // clear textarea txt.value=" ...