Click here to Skip to main content
15,746,302 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a function
HTML
<IMG id="imgClose" onmouseover="javascript:mouseOver(this,'28 outerClose_on.GIF')" title="Close (Esc)"
							style="CURSOR: hand" onclick="javascript:CloseWindow();" tabIndex="5"  önmouseout="javascript:mouseOut(this,'28 outerClose_off.GIF')"
							src="../AxCommon/Images/28 outerClose_off.GIF" tag="4">

C#
function mouseOver(img,name)
        {
        //debugger
            img.src = '../AxCommon/Images/' + name;
            img.style.cursor = 'hand';
        }

        function mouseOut(img,name)
        {
        //debugger
            img.src = '../AxCommon/Images/' + name;
            img.style.cursor = 'default';
        }


I have got an error wrong parameters when javascript function reads.
Posted
v2

1 solution

I did not figure out what's the problem, just because there is a very convenient way of doing such things, with jQuery:
http://api.jquery.com/hover/[^].

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://docs.jquery.com/Tutorials:How_jQuery_Works[^],
http://docs.jquery.com/Tutorials[^],
http://docs.jquery.com/Main_Page[^].

—SA
 
Share this answer
 
Comments
Espen Harlinn 16-Aug-12 10:28am    
Good idea :)
Sergey Alexandrovich Kryukov 16-Aug-12 12:34pm    
Thank you, Espen.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900