I am getting user ID on fly and will use it to show the user image.
For that I want to set the img
path when user click on button.
HEre is code:
HTML:
<img id="i1" style="display:none" src="" > </img>
<button typye="submit" onclick="CallAfterLogin()"> Show image </button>
JS:
function CallAfterLogin() {
var path = "http://thestylishdog.com/wp-content/uploads/2009/07/cute-dog2.jpg";
document.getElementbyID(i1).src = path;
document.getElementbyID(i1).display = "block";
}
Fiddle:
http://jsfiddle.net/karimkhan/qeyRK/2/
What's wrong?