Hey Forumers,I have been trying to get this javascript to work, but it seems it doesn't display my image.<script type="text/javascript">function getAvatar(){ var currentUser = <%=Session("UserName")%> $('himg_something').src = "~/ProfileImage/" + currentUser + "/avatar.jpg"} </script>himg_somthing is the img tag as follows:<img id="himg_something" alt="Avatar" src="~/ProfileImage/Image1.bmp" onload="getAvatar()"/>What I am basically trying to achieve is to display the user's avatar based on the session variable in code behind, but I cannot seem to get it to work. Thanks in advanceZeph
View Complete Post