Hello Navin,
Do the following in your code to make it work:
1. Give id to image tag
2. Use the below modified javascript function:
- function showImg(picName){
-
document.getElementById('PopUp').style.display='block';
-
document.getElementById('imgPIC').src = "pics/" + picName + ".jpg";
-
}
-
-
function hideImg(){
-
document.getElementById('PopUp').style.display='none';
-
document.getElementById('imgPIC').src = "";
-
}
3. Call ShowImg function by passing date as paramter:
- <a href="javascript:void(0)" onMouseOver="showImg('5')" onMouseOut="hideImg()">5</a></td>
4. And the last and the most important thing... you need to rename your images as dates depending on what image you want to display for that date in DIV.
So for e.g. republic day image should be renamed as 26.jpg
and call showImg function as showImg('26').
And this would display republic day image in DIV.
Hope this helps.
Thanks,