Class catalog maintenance application: What this application should do This appl
ID: 3795564 • Letter: C
Question
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.
Here is the starting html, I just need the javascript file created to be able to enter the classes in the application:
<html>
<body>
<h1>Class Catalog Maintenance</h1>
<h3>Classes</h3>
<table width=100%>
<tr>
<th>Name</th><th>Number</th><th>Start</th><th>Length</th><th>Weekday</th><th>Time</th><th>Description</th>
</tr>
<tr align="center">
<td>Web Design I</td><td>IT 101</td><td>9/1/2016</td><td>10</td><td>MWF</td><td>10:00</td><td>HTML5 and CSS3</td>
</tr>
<tr align="center">
<td>Web Design II</td>
<td>IT 101</td>
<td>1/1/2017</td>
<td>10</td>
<td>MWF</td>
<td>14:00</td>
<td>JavaScript,jQuery,jQuery UI, and Bootstrap</td></tr>
</table>
<h3>Add a class</h3>
Class Name: <input type=text/><br>
Class Number: <input type=text/><br>
Start Date: <input type=text/><br>
Class length <select></select>
(In Weeks):<br>
Weekday and <select></select> <select></select>
Time:<br>
Class Description
<textarea>
</textarea><br>
<button type=submit>Add</button><button type=reset>Clear</button>
</body>
</html>
Explanation / Answer
Hi,
You can write the javascript code as below in your application to populate your class name textbox:
document.getElementbyId("YourTextboxId").innerText=value;
Here, you can replace the value with the stuff that you want over there.Also, in your HTML code assign the controls some Id so that you can use them in your javascript code and server side code.
I hope it solved your problem.Please let me know in case of any further queries.