Ping me on WhatsApp +92 343 9293686
JavaScript is a versatile programming language with several defining characteristics. Three of its prominent features are:
• The use of AJAX for accessing and retrieving objects from the internet
• The representation of objects using JSON
• The availability of the popular library, jQuery.
In this assignment, we will be utilizing AJAX to read JSON objects from a server that has been implemented using Node.js. We will then access a file from that server using a web browser such as Chrome or Firefox, which will represent the client side. Additionally, we will be leveraging some of the useful functionalities provided by jQuery.
You need to follow the next steps to develop the assignment:
1.- (1 pts) Create a README file with the instructions to execute your code and listing the parts that are completed and the ones that are missing.
2.- (2.5 pts) Create a server using Node.js, store a website called index.html in the root directory and create a subdirectory named "country-objects" to store additional files. To ensure easy accessibility, use the path name "/country-objects" for the subdirectory.
Once the server is running, the client's browser can load the index.html page, which can then execute JavaScript and AJAX code to access the different files stored in the "country-objects" subdirectory. To facilitate this process, Node.js will listen for the client's requests and respond to them by performing file system reading operations.
The files we need to access are:
● Country/Capital
https://github.com/samayo/country-jso...
● Country/Continent
https://github.com/samayo/country-jso...
● Country/Coast Line
https://github.com/samayo/country-jso...
● Country/Currency name
https://github.com/samayo/country-jso...
● Country/ Internet domain
https://github.com/samayo/country-jso...
● Country/Flag
https://github.com/samayo/country-jso...
3- (2.5 pts) Create a website, start by creating a file named "index.html" with a button that will display a table once clicked. The code for accessing the JSON files should use AJAX technology. Be sure to include headers and paragraphs to explain the purpose of the program and the technologies being implemented.
For instance, you can add the following statements: "This website utilizes AJAX technology to access JSON objects," and "AJAX is a technology based on JavaScript that allows for dynamic loading of data without having to reload the entire page." Additionally, you can include information about JSON, such as "JSON is a format for storing and exchanging data that is human-readable and easily parsed by computers."
Once the button is clicked, the program will read the JSON files and generate a table with fields for all countries worldwide.
Country -- Continent -- Currency name -- Internet domain -- Flag
Ireland, Europe, EUR, .ie,
Table 1: We will merge all the files to create a single table with all the fields for each country.
After clicking the button to load all the files, the program should wait for five seconds before modifying a paragraph to indicate that the folder (name of the folder) has been read. Once all the files have been read, the program will generate a unique table as shown in Table 1 with all countries and publish the message "The table has been created and has taken X seconds."
To create the table, use a two-dimensional array to store the data from all files and merge them based on the country name as a key. Additionally, include a button that allows the user to show either all countries or only the first 20. By default, the program should show only the first 20 countries. You may use either AJAX or jQuery to achieve this functionality.
4.- (3 pts) In addition to the previous functionalities, include several buttons that use jQuery to modify the properties of the website. These buttons can be used to implement various effects such as fading, hiding, or showing elements. You can include up to six different functionalities that can be applied to paragraphs, headers, the table, or any other element on the page.
Each button should correspond to a different effect, and when clicked, the effect should be applied to the corresponding element. If the button is clicked again, the text of the button should change to restore the original view.
#thinkswithyou
Смотрите видео Create a simple website in Node.js || Create a server using Node.js || Thinkswithyou онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Thinkswithyou 21 Декабрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1 раз и оно понравилось людям.