Need 3 separate files HTML CSS and Javascript to create the

Need 3 separate files (HTML, CSS, and Javascript) to create the below class catalog maintenance application:

What this application should do

This application will build a list of classes that are offered by the GIT department. It will accept the user entries that are shown under the “Add a class” heading in the interface above.

Then, when the user clicks the Add button, a class will be added to the table that’s under the “Classes” heading. The data in this table will also be stored in local web storage. As a result, the class data will be displayed when the user restarts the application.

Of course, the data should be validated before it is added to the Classes table and local storage. At the least, the application should check that an entry has been made in each input and select control and that the start date is a valid date in the future. But it would also be good to check whether a class with a duplicate number is already in the table.

What you need to do

Build this application from scratch with separate files for the HTML, CSS, and JavaScript.

Development notes

Be creative: Try to create a user interface that’s more pleasing and user friendly than the one above. For instance, you might want to put the Classes table below the form for the class entries.

You decide what options should be offered in the three select controls (drop-down lists).

The form must be centered and formatted using CSS. An HTML table is only allowed for the Classes data.

You may not use jQuery Bootstrap or any type of WSYWIG to develop this app. And you may not rely on HTML5 attributes and CSS3 selectors for data validation. In other words, this assignment must be completely hand coded.

In the JavaScript, add appropriate comments to each function that you create.

Technical note

The starting html for the Classes table must have both a thead and tbody element. Otherwise, the th elements for the column headings may get written over by the JavaScript that adds the Class rows to the table.

The user interface should look something like this: Class Catalog Maintenance Classes Number Start Length Weekday Time Description Name MWF Web Design I IT 101 9/1/2016 10 10:00 HTML5 and CSS3 Web Design II IT 102 1/1/2017 10 MWF 14:00 JavaScript, jQuery, jQuery UI, and Bootstrap Add a class Class Name: Class Number: Start Date Class Length (in weeks Weekday and Time: Class Description Add Clear

Solution

<html>
<head>
<style>
.mainHeading{

color:blue;
}
.formTable{
line-height: 31px;
}
.options{
width: 175px;
}
.formButton{
width:175px;
}
.description{
height: 82px;
width: 293px;
}
</style>
</head>
<body>

<div id=\"Main\">
<h2 id=\"mainHeading\" class=\"mainHeading\">Class Catalog Maintenance</h2>
<h3 id=\"classesHeading\" style=\"display:none;\">Classes</h3>
<div id=\"content\" style=\"display:none;\">

</div>

<div id=\"\"classForm>

<h3><b>Add a Class</b></h3>
<table id=\"formTable\" class=\"formTable\">
<tr><td><label>Class Name:</label></td><td><input type=\"text\" id=\"name\"/></td></tr>
<tr><td><label>Class Number:</label></td><td><input type=\"text\"id=\"number\"/></td></tr>
<tr><td><label>Start Date:</label></td><td><input type=\"text\" id=\"date\"/></td></tr>

<tr><td><label>Class Length(in weeks):</label></td>
   <td><select class=\"options\"id=\"length\">
       <option value=\"\"></option>
       <option value=\"10\">10</option>
       <option value=\"15\">15</option>
       <option value=\"20\">20</option>
       <option value=\"25\">25</option>
   </select></td></tr>
<tr><td><label>Weekaday and Time:</label></td>
   <td><select class=\"options\" id=\"day\">
       <option value=\"\"></option>
       <option value=\"MWF\">MWF</option>
       <option value=\"FSS\">FSS</option>
   </select></td>
   <td><select class=\"options\" id=\"time\">
       <option value=\"\"></option>
       <option value=\"10:00\">10:00</option>
       <option value=\"14:00\">14:00</option>
       <option value=\"16:00\">16:00</option>
      
   </select><td></tr>

</table>
<label>Class Description:</label><br><br>
&nbsp;<textarea id=\"description\" class=\"description\"></textarea>
<br>
<input class=\"formButton\" type=\"button\" value=\"Add\" onclick=\"submitForm();\"/>

<input class=\"formButton\" type=\"button\" value=\"Clear\" onclick=\"clearAll();\"/>

</div>

</div>


</body>
</html>
<script>


var classArr =[];
function submitForm(){
var classObj= new Object();
   classObj.name =document.getElementById(\"name\").value;
   classObj.number =document.getElementById(\"number\").value;
   classObj.date =document.getElementById(\"date\").value;
   classObj.length =document.getElementById(\"length\").value;
   classObj.day =document.getElementById(\"day\").value;
   classObj.time =document.getElementById(\"time\").value;
   classObj.desc =document.getElementById(\"description\").value;

classArr.push(classObj);


displayClass(classArr);

}

function displayClass(myArray){

var htmlStr=\"<table><tr><td><b>Name</b></td><td><b>Number</b></td><td><b>Start</b>\";
htmlStr=htmlStr+\"</td><td><b>Length</b></td><td><b>Weekday</b></td>\";
htmlStr=htmlStr+\"<td><b>Time</b></td><td><b>Description</b></td><tr>\";

for(var i=0; i<myArray.length;i++){

htmlStr = htmlStr+\"<tr><td>\"+myArray[i].name+\"</td>\";
htmlStr = htmlStr+\"<td>\"+myArray[i].number+\"</td>\";
htmlStr = htmlStr+\"<td>\"+myArray[i].date +\"</td>\";
htmlStr = htmlStr+\"<td>\"+myArray[i].length+\"</td>\";
htmlStr = htmlStr+\"<td>\"+myArray[i].day+\"</td>\";
htmlStr = htmlStr+\"<td>\"+myArray[i].time+\"</td>\";
htmlStr = htmlStr+\"<td>\"+myArray[i].desc+\"</td></tr>\";

}
htmlStr =htmlStr + \"</table>\"

document.getElementById(\"content\").innerHTML =htmlStr ;
document.getElementById(\"content\").style.display=\"\";
document.getElementById(\"classesHeading\").style.display=\"\";

}
function clearAll(){
   document.getElementById(\"name\").value=\"\";
   document.getElementById(\"number\").value=\"\";
   document.getElementById(\"date\").value=\"\";
   document.getElementById(\"length\").value=\"\";
   document.getElementById(\"day\").value=\"\";
   document.getElementById(\"time\").value=\"\";
   document.getElementById(\"description\").value=\"\";
}

</script>

Need 3 separate files (HTML, CSS, and Javascript) to create the below class catalog maintenance application: What this application should do This application wi
Need 3 separate files (HTML, CSS, and Javascript) to create the below class catalog maintenance application: What this application should do This application wi
Need 3 separate files (HTML, CSS, and Javascript) to create the below class catalog maintenance application: What this application should do This application wi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site