I currently have a list of items which should be partly filled by an AJAX call. What I have:
<li>Hello, username</li>
The AJAX call pulls the username from a database. So how do you append that pulled information to display it next to "Hello" since anything in the li
tags is straight text?
The AJAX:
ajax({
type: "GET"
url: '../info
success: function (data){
if (data != ''){
var user = info.username;
}
}
})
How would the variable user be put in to the list item tag? can you do something like
<li>Hello, "$user"</li>