Microsoft JScript runtime error: object does not support this property or method

I try to use jGrowl in ASP.NET, but I get a Microsoft JScript runtime error: Object does not support this property or method error when trying to run a page in IE. Any ideas why this is happening?

<link rel="stylesheet" href="css/jquery.jgrowl.css" type="text/css" /> <style type="text/css"> div.jGrowl div.smoke { background: url(images/smoke.png) no-repeat; -moz-border-radius: 0px; -webkit-border-radius: 0px; width: 280px; height: 55px; overflow: hidden; } </style> <!--[if lt IE 7]> <link rel="stylesheet" href="css/jquery.jgrowl.ie6.css" type="text/css" /> <![endif]--> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.jgrowl.js"></script> <script type="text/javascript" src="js/jquery.template.js"></script> <script type="text/javascript" src="js/jquery.ui.all.js"></script> <script type="text/javascript" src="js/jquery-1.4.2.js" ></script> <script type="text/javascript"> $(document).ready(function(){ $('#test2').jGrowl("TEST", { theme: 'smoke', closer: true }); }); </script> 

BODY:

 <a onclick="$('#test2').jGrowl('TEST');" href="javascript:void(0);">Sample 3</a> 
+7
source share
3 answers

I think you enable jquery twice. You have jquery.js and jquery-1.4.2.js script files. Everything seems to connect to the first instance, and then the latter includes $ overrides. So why you see this error message.

+14
source

Including 2 jquery files of the same type creates such errors. Get rid of one of them, and your problem is solved.

 //<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.jgrowl.js"></script> <script type="text/javascript" src="js/jquery.template.js"></script> <script type="text/javascript" src="js/jquery.ui.all.js"></script> <script type="text/javascript" src="js/jquery-1.4.2.js" ></script> 
+3
source

You may not have posted your full page source, but if you have this line in addition to other jQuery / JavaScript, try removing it from the page.

 <script language="javascript" type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> 
0
source

All Articles