Question

Use visual studio code to write the javascript programme. For this lab you must use a...

Use visual studio code to write the javascript programme.

For this lab you must use a reasonable faceted search example, each item must have at least three categorical attributes and at least one numeric attribute. Attributes such as ID, name etc do not count as categorical or numeric attributes.

(a) Define a class for your item that meets the above three categorical and one numeric attribute requirements.

(b) Create a text file that contains at least 5 such records in CSV format.

(c) Create a HTML page that contains a table element the shows one item record (hardcoded in the HTML).

(d) Add a script element into your HTML page that prints ‘hello’ to the browser’s JavaScript developer console.

(e) Add JavaScript code that uses ‘fetch’ into your HTML page that loads your item text file. Use a python initiated local server to serve that text file.


yes, we need parse and dosplay it in the table

Homework Answers

Answer #1

Author: Rishabh Jain

Date:08/09/2019

<html>

<head>

<body>

<table>

<tr>

<th>Industry Type</th>

<th>Occupational Safety and Health</th>

<th>Sources of Hazards</th>

<th>Scale of Workers</th>

</tr>

<tr>

<td>Chemical</td>

<td>General</td>

<td>Acid</td>

<td>200</td>

</tr>

</table>

<script>

console.log("Hello");

url='' //enter your url

let response = fetch(url);

if (response.ok) { // if HTTP-status is 200-299
// get the response body (the method explained below)
let json = response.json();
} else {
alert("HTTP-Error: " + response.status);
}
console.log(response)

</script>

</body>

</head>

</html>

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Use visual studio code to write the javascript programme. Write a function that counts the number...
Use visual studio code to write the javascript programme. Write a function that counts the number of values each item attribute has. This is effectively a group-by on the item table for each column. For example: if the first attribute is colour, and its values are [ ‘red’, ‘black’, ‘white’, ‘black’, ‘red’ ], the counts for colour would be: red 2 black 2 white 1
PART B- Javascript Using a text editor (VS Code or Notepad) and a web browser, you...
PART B- Javascript Using a text editor (VS Code or Notepad) and a web browser, you will demonstrate how to create an HTML file, externally link a JavaScript file, and write some source code in the JavaScript file. a..Create two blank files to be an HTML file and a JavaScript file. The file names should be partA.html and partA.js. b.. Create a basic HTML webpage structure. c..Link the JavaScript file to the HTML file using the <script> tag. d.. Prompt...
You must implement a dynamic webpage the provides a basic task-list functionality. In particular, you page...
You must implement a dynamic webpage the provides a basic task-list functionality. In particular, you page should provide a user an interface to add and remove a task as well as mark a task as completed. For this version of the assignment, the tasks will be added directly in the HTML page by manipulating the DOM. Moreover, you should maintain an array that stores task details. Each task comprise of three fields: task-title: which is a one-line description of the...
For this lab assignment you will need to write some code and create some graphs. You...
For this lab assignment you will need to write some code and create some graphs. You may use excel to create your graphs, or other language of your choice. Your data needs to demonstrate the experimental running time for Selection Sort (code in book), Merge Sort (code in book), and the Arrays.sort() method. Here is a basic outline of how you need to code this assignment. 1) Create several arrays of size 100, 1000, 10000, 100000, 1000000, … (you need...
Code a C file, following these instructions: This lab is about getting the input from a...
Code a C file, following these instructions: This lab is about getting the input from a file. Let’s assume the words are provided in one file, passed as an argument to your program. The names of the files are provided as arguments to your program (i.e., they are copied by the shell in the argv variable), and each file is a text file with lots of words. Open the manual page for open() system call and add to your code...
I have trouble in my code with - Create and append the fancySheet link element to...
I have trouble in my code with - Create and append the fancySheet link element to the document head - Create and append figBox element to element with id box - Populate the figure box with preview images of the five fancy style sheets I don't understand what went wrong. New Perspectives HMTL5, CSS3, and JavaScript T12 Case Problem 1: New Accents Photography JavaScript File Event Listener Go to the na_styler.js file in your editor. Add an event listener that...
6.12 LAB: Grade distribution In this lab, you will write a JavaScript program that generates a...
6.12 LAB: Grade distribution In this lab, you will write a JavaScript program that generates a bar graph of letter grades from a distributions of scores. Implement the parseScores function (1 point) Implement the parseScores function to take a space-separated string of scores as an argument and return an array of score strings. Each score is a number in the range [0, 100]. Ex: "45 78 98 83 86 99 90 59" → ["45","78","98","83","86","99","59"] Hint: JavaScript's string split() function can...
Create an external style sheet and link it to an html file. Use css to style...
Create an external style sheet and link it to an html file. Use css to style the page and table. I don't want it to look like the default browser styling on anything. Use your own css, don't use the defaults from a css framework like bootstrap. Add some appropriate headlines, titles, and any other content you think is appropriate to the document. Get data from here: http://pds.jpl.nasa.gov/planets/special/planets.htm Use any 4 of the full planets (not pluto or small bodies)....
Section 1.1: Creating the First Table Locate the HTML comment that reads "table 1" just below...
Section 1.1: Creating the First Table Locate the HTML comment that reads "table 1" just below the opening body tag. Add a table tag with the following specifications using the style attribute and CSS: width with a value of 650 pixels a margin set to auto – this will center the table within the web page a border set to none - this removes the table border Add a table row (<tr>) Add a table data container tag (<td></td>) Within...
You have one Question, Which have four parts, 1st... PHP scriptIn a HTML document, use PHP...
You have one Question, Which have four parts, 1st... PHP scriptIn a HTML document, use PHP to obtain the following :The user will write a sentence as a value of a predefined variable.The output should look like this :The sentence you entered is :This is my sentenceIt is composed of :• 4 different words• 19 characters (including spaces)Note : Your program should make sure the final output is in lower case with the first letter in upper case. 2nd... PHP...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT