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 419 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Wed 1st Apr 2020, 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 2020, 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 2020, 8:37pm
Actions: 
        Login-to-reply

 

"Haolin Wu" <21*0*1*[email protected]*u*e*t*u*a*e*u*a*> 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: 11:27am Sep 21 2020