Ajax, description is given in the description box

Ajax, description is given in the description box

Please help me to complete the following tasks. Instructions given below.

a. Attahced is an xml file named crypto

b. In the HTML webpage, include a button that will trigger reading from XML file. You must use AJAX to complete this task. Use JavaScript, NOT jQuery code.

c Display the data in HTML table. .Make sure to indicate positive changes with green color and use red color to indicate negative value.

d. Calculate differences in percentage, and display in the same table. (see sample Image uploaded as sample)

What i have done so far…..

<html>

<head>

<title>Assignment</title>

<link rel=”stylesheet” href=”style.css” type=”text/css” />

<script type=”text/javascript”>

function BookFare() {

$(document).ready(function(){

$.ajax({

type:”GET”, //USING GET METHOD

url: “crypto.xml”, //find path

datatype: “xml”, //find the file type

success: function(xml){

$(xml).find(“coins”).each(function(){

var title, director;

// making selection

name = $(this).find(“name”).text();

//making selectionL

price = $(this).find(“price”).text();

price_before = $(this).find(“price_before”).text();

//here is the output result

$(“<tr></tr>”).html(“<td>”+name+”</td>”+”<td>”+price+”</td>”+”<td>”+price_before+”</td>”).appendTo(“#my_Table”);

});

},

//error, display the following

error:function(){

alert(“Unfortunately, this find can not be read”);

}

});

});

};

</script>

</head>

<body onmousemove=”document.bgColor=’#512500′” onmouseleave=”document.bgColor=’white'”>

<p class=”heading1″>Assignment</p><br><br>

<p class=”theHeader”><u>Read XML</u></p>

<p>

<table border=”5″ id=”my_Table”>

<tr>

<th>Name</th>

<th>Unit</th>

<th>Price Per Unit</th>

<th>Price Before</th>

<th>Price Change</th>

<th>Difference</th>

</tr>

</table>

<button type=”button” onclick=”Price()”>Get Latest Price</button>

</p>

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>

</div>

<!– This part goes up to goUpNow (beginner) when clicked –>

<a href=”#goUpNow”><img src=”image/Move_GoUp.png” class=”topimage”/></a>

<div id=”finalFooter”>

<hr />

<img src=”image/uwollongong.jpg” class=”ftElement” />

</div>

</div>

<!– The div ends here –>

</body>

</html>

……………………………………………………………………………………………………………………………………..

<?xml version=”1.0″?>

<crypto_market releaseTime=”24/10/2017 12:00:00″>

<coins id=”BTC”>

<name>Bitcoin</name>

<price currency=”USD”>5664.92</price>

<price_before>5948.17</price_before>

</coins>

<coins id=”ETH”>

<name>Ethereum</name>

<price currency=”USD”>302.35</price>

<price_before>292.92</price_before>

</coins>

<coins id=”XRP”>

<name>Ripple</name>

<price currency=”USD”>0.2003</price>

<price_before>0.2022</price_before>

</coins>

<coins id=”BCH”>

<name>Bitcoin Cash</name>

<price currency=”USD”>322.77</price>

<price_before>331.00</price_before>

</coins>

<coins id=”LTC”>

<name>Litecoin</name>

<price currency=”USD”>56.28</price>

<price_before>55.87</price_before>

</coins>

<coins id=”DASH”>

<name>Dash</name>

<price currency=”USD”>294.24</price>

<price_before>272.14</price_before>

</coins>

<coins id=”XEM”>

<name>NEM</name>

<price currency=”USD”>0.2069</price>

<price_before>0.2066</price_before>

</coins>

<coins id=”NEO”>

<name>NEO</name>

<price currency=”USD”>30.16</price>

<price_before>27.84</price_before>

</coins>

</crypto_market>

I just need the coding….

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper