Hi All
I could not display my image through this getElementsById (ImgName).Pleas e let me what is wrong with this piece of code .I have stored all my images in the Doclib of sharepoint site.The last line of the code is throwing error also do let me know in case if we have any other alternate solutions to display my image.
Thanks
Jag
I could not display my image through this getElementsById (ImgName).Pleas e let me what is wrong with this piece of code .I have stored all my images in the Doclib of sharepoint site.The last line of the code is throwing error also do let me know in case if we have any other alternate solutions to display my image.
Thanks
Jag
Code:
<span class="srch-Icon">
<img alt="n1" id="{concat('IMG_',$id)}" src="http://a2ms04866:3000/Pdfimage/_t/pdf%5Ficon%5Fsmall_gif.jpg" onmouseover ="javascript:cool1('{concat('IMG_',$id)}','{title}')"/>
<script language="javascript">
function cool()
{
alert("hii");
}
function cool1(ImgName, Title)
{
alert(ImgName);
alert(Title);
var i=Title.indexOf(".");
var xcv=Title.substring(0,i);
var imagepath='http://a2ms04866:3000/Pdfimage/'+xcv+'.jpg';
alert(imagepath);
document.getElementsById(ImgName).src=imagepath;
//alert(imagepath);
}
</script>
Comment