I'm making a simple login form with ajax and I want to display the users name and picture
to a <div>
.
The username is shown but the picture not.
$.ajax({
type: 'POST',
url: baseURL,
dataType: 'json',
data: {
action: "LOGIN",
username: username,
password: password
},
success: function(data) {
if (data == "empty") {
$("#errorArea").fadeIn();
$("#errorArea").html("Error: Wrong username or password");
}
else {
$("#userPanelContent").html(data);
}
}
});
Can anyone tell me how to fix it?