ASP.NET - how to embed image in hyperlink
Asked By mani on 24-Jan-12 12:08 AM
hi..i have text in my editor controll..and i want to make that text as hyperlink and need to embed image into that hyperlink when uploading images....
like embeding url in hyperlink.....
after posting that text..i need to display that embeded image on mouseover on that hyperlink???can anyone help???if its not clear i will explain in detail//...
Devil Scorpio replied to mani on 24-Jan-12 08:38 AM
Hi,
I dont now whether it will work in ur case. Its working finre in PHP. U need to follow this logic. Lets hope for the best.
<html>
<head>
<title>Image Hover</title>
<script type="text/javascript">
function Show_Image(IDS) {
document.getElementById(IDS).style.display = "block";
}
function Hide_Image(IDS) {
document.getElementById(IDS).style.display = "none";
}
</script>
</head>
<body>
<a href="javascript:alert('Link to somewhere.')"
onMouseOver=Show_Image('Img1') onMouseOut="Hide_Image('Img1')">Link with image</a>
<span id="Img1" style="display:none">
<img src="ImageSourcePathAndFile" alt="Image information" /></span>
</body>
</html>