CSIT 128 Assignment 7-AJAX Solved

25.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

Task 1

  1. Open your Moodle, and download the XML file. (credit_card.xml). Prepare HTML page with JavaScript to read data from XML document. In your HTML webpage, include a button that will trigger the process to read data from XML file. You must use AJAX to complete this task. Use JavaScript, NOT jQuery code.

Once you have prepared the AJAX script, display the data in HTML table. See sample output below.

Figure 1: Sample output after reading XML document

  1. From your previous output in Task 1a, modify your code to include the additional criteria. You may refer to sample image below as reference.
    • Include currency unit for previous balance, expenses and payment.
    • Find the average value for expenses.
    • Find the maximum value for expenses. (hint: use Math max for array)
    • Find the minimum value for expenses. (hint: use Math min for array)
    • Include a proper decision logic (in JavaScript) to display new balance and status.
      1. new balance = previous balance + expenses – payments.
      2. Each card has a credit limit of RM 1000. If the new balance is more than credit limit, then display the status.
  • Use ‘red font’ for value beyond the credit limit and ‘green font’ for under the limit.

Figure 2: Sample output after including logical decision using JavaScript

 

  • CSIT128_Assignment7-qgs4gi.zip