hi
I used the below codes for changing image tag src with JavaScript (When the mouse passes over it)
<asp:Image ID="Image2" runat="server" ImageUrl="~/image/MainM/view.png" CssClass="ImgletsL" onmouseout="LetsStartImageL()" onmouseenter="LetsStartGIFL()"></asp:Image>
<script type="text/javascript">
var StartPicL = document.getElementById("Imgstart");
function LetsStartGIFL() {
StartPicL.src = "image/MainM/view1.gif";
}
function LetsStartImageL() {
StartPicL.src = "image/MainM/view.png";
}
</script>
now I use image tag in gridview:
<asp:GridView ID="GrdAmlak" runat="server" AutoGenerateColumns="false" Font-Size="14px"
OnRowDataBound="OnRowDataBound" PageSize="10" RowStyle-CssClass="grid1" GridLines="Vertical">
<columns>
<asp:TemplateField ItemStyle-Width="146px" ItemStyle-CssClass="dirM">
<itemtemplate>
<div class="pictureContainer1">
<asp:Image ID="Imgstart" runat="server" ImageUrl="~/Image/MainM/view.png" CssClass="imageH" onmouseout="LetsStartImageL()" onmouseenter="LetsStartGIFL()"></asp:Image>
</div>
</itemtemplate>
</asp:TemplateField>
</columns>
But when I use image tag in GridView it doesn’t work I mean it doesn’t change image src on mouse enter
What should I do?
Best regards
Neda