Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Microsoft JScript runtime error: Object expected

XML
<script type="text/javascript">

$(document).ready( function()
{
$("#imgcon").mousemove( function( e )
  {
    var offset = $(this).offset();
    var x = e.pageX - offset.left
    var y = e.pageY - offset.top;
    //$("#x-coordinate").text(x);
    //$("#y-coordinate").text(y);
  });
});

</script>




error is coming after coding for javascript plz help...
Posted

1 solution

Please make sure there should the html element with id imgcon. OR show your html code
 
Share this answer
 
Comments
SK, The Boss 10-Jun-11 9:29am    
<asp:ImageButton ID="imgcon" ImageUrl="~/container.JPG" runat = "server"
Width="650px" Height="300px" onclick="imgcon_Click"/>
Kiran Sonawane 10-Jun-11 9:31am    
You should use like this

$("#<%=imgcon.ClientID%>").mousemove( function( e )
thatraja 10-Jun-11 11:22am    
Spot on, 5!
Sergey Alexandrovich Kryukov 10-Jun-11 19:21pm    
Most likely this is the reason, a 5.
--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