Question: I need help with step number 4. This section will be in bold. The original question is below: [1] Prepare a standard web folder (web

I need help with step number 4. This section will be in bold.

The original question is below:

[1] Prepare a standard web folder (web app) that has an index.html file (will auto load) with a (a) data (b) js and (c) css subfolder. Inside each subfolder you should place the corresponding javascript, css and json data files for this project.

[2] Your index.html file should load some basic css and the JQuery library (you may use either downloaded local copies of each library or may use the cdn style loading on the client). This index file should start with two sequential div tags (they will be siblings in the DOM):

[3] Make a data.json file and place it inside of the data folder in step [1]. The contents should have some data like (dont forget to have at least one kwy and a newline after the closing bracket:

{data:[200,401,404,500,201]}

[4] Write two javascript functions inside ajax.js that uses the corresponding ajax GET methods via the two techniques we explored to load json data into the inner HTML of a newly constructed node:

ajax data goes here

get_vanilla_data(id,url) - use the regular XHR technique

get_jq_data(id,url) use the $().ajax() technique

and then call each of functions using the url for the data.json file from step [3] while attaching to the corresponding areas laid out for you in step [2].

get_vanilla(#vanilla_ajax,data/data.json);

get_jq_ajax(#vanilla_ajax,data/data.json);

[5] Test and verify that all libraries are loading and functioning and that each of the two methods are doing the same thing: loading json data via an ajax call and modifying the DOM with the result...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!