How to change image visibility in JavaScript?

Viewed 3194

I tried this, with no success :

JS :

function Hide() {
    alert('Hide');
    document.getElementById('I').style.visibility = 'none';

}

function show() {
    alert('Show');
    document.getElementById('I').style.visibility = 'visible';

}

Code Behind :

<asp:LinkButton ID="LinkButton1" onmouseover="show()" onmouseout="Hide()" runat="server">Mouse Here</asp:LinkButton>

<asp:Image Visible="false" ImageUrl="~/Images/V.png" ID="I" runat="server" />

I added the alerts just to check if this active the function, and it is.

any suggestions?

Thanks!

3 Answers
Related