Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

About AJAX

3 of 361 articles shown, currently 1 other person reading this forum.
photo
From: ANONYMOUS
Date: Wed 1st Apr, 1:06pm
Actions: 
        Login-to-reply
Hi
I followed the workshop of the AJAX and tried to collect the data by using the COV-19 
API website which provided in the project 1. I modified the codes from the workshop 

"
let locations = data.locations; 
return lacations.map(
            function(location) {
                 ......
            span.innerHTML = '${location.country}';
                    }
             ......
)
"

It didn't come out to give me the country names but just showed many 
"${location.country}". Is there something wrong in my codes?
Thanks.

About AJAX

photo
From: Haolin W.
Date: Wed 1st Apr, 5:55pm
Actions: 
        Login-to-reply
Those are quotes in your code for ${location.country}. You need to use backticks, this 
indicates a formatted string. Change them to `.

About AJAX

photo
From: ANONYMOUS  O.P.
Date: Wed 1st Apr, 8:37pm
Actions: 
        Login-to-reply
"Haolin Wu"                               wrote:

> Those are quotes in your code for ${location.country}. You need to use backticks, this 
> indicates a formatted string. Change them to `.
Oh that is so small different, thanks. Also if I want to get the name before the data, like I 
want to get the "Confirmed" before the confirmed case number, how can I achieve that? 
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020