I am dealing with an XML file that contains information about various platforms, task types, and the time each task takes to complete. My goal is to perform a calculation using this data.
Below is a snippet of my XML File:
<?xml version="1.0" encoding="UTF-8"?>
<platforms>
<sitecore>
<task>
<taskname>promobox</taskname>
<time>10</time>
</task>
<task>
<taskname>newswire</taskname>
<time>30</time>
</task>
</sitecore>
<siab>
<task>
<taskname>promobox</taskname>
<time>20</time>
</task>
<task>
<taskname>newswire</taskname>
<time>15</time>
</task>
</siab>
</platforms>
The front-end HTML structure is as follows:
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="css/custom.css">
<title></title>
</head>
<body>
<div class="container">
<div class="col-md-8 col-centered">
<h2>Time Calculator</h2>
<form>
<div class="form-group">
<label for="platform">Platform</label>
<select class="form-control" id="platform">
<option>BDE</option>
<option>GCMS</option>
<option>Sharepoint</option>
<option>Siab</option>
<option>Sitecore</option>
</select>
</div>
...
... (Truncated for brevity)
...
</table>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
In order to streamline the process, I need to merge all platforms into one dropdown menu and have specific task types in another dropdown. Once a platform and task type are selected, along with entering the number of units, the predefined time from the XML file will be multiplied by the number of units and displayed in a table format. As I am a novice in jQuery, I am currently unsure where to begin with implementing this functionality.