Hi there
I am trying to load Image on a Particular section from my JSON file
this is function that I am using
<script type="text/javascript">
function myProfile(){
$.get("/CollegeManagementSystem/myprofileget",
{
}
).error(
).success(
function(data)
{
$("#userName").text(data.userName);
$("#userMob").text(data.userMob);
$("#userEmail").text(data.userEmail);
$("#userCategory").text(data.userCategory);
$("#userDept").text(data.userDept);
$("#userSubDept").text(data.userSubDept);
$("#userImage").prop('href','javascript:data.userImage');
}
);
}
window.onload=myProfile();
</script>
and this is my HTML page
<div id="left_block" style="float: left;">
Name:<label id="userName">Name is Here</label><br>
Mob:<label id="userMob">Mobile Number is Here</label><br>
Email:<label id="userEmail">Email is Here</label><br>
Category:<label id="userCategory">Ctegory is Here</label><br>
Dept:<label id="userDept">Department is Here</label><br>
Sub Dept:<label id="userSubDept">Sub Dept is Here</label>
</div>
<div id="right_block" style="float: right;">
<img src="#" alt="Image is Here" width="20%" id="userImage"></img>
</div>
and this is my JSON response
{"userName":"AdamGilichrist","userMob":"8789878908","userCategory":"HR","userDept":"null","userSubDept":"null","userEmail":"adamgilichrist@gmail.com","userImage":"W0JANWYzOTY1MDg="}
what I am not getting Image set on block except that all are working fine like Name,Mob and other fields are setting fine
Where is wrong?
Thanks