Note that there are some explanatory texts on larger screens.

plurals
  1. POYet Another "Object doesn't support this property or method" - jQuery
    primarykey
    data
    text
    <p>I just switched my App to run on MVC3 and the Razor view engine, and now I'm getting a JavaScript error. The thing is, nothing has changed on the JavaScript side of things... it worked before.</p> <p>Here's the code</p> <pre><code>&lt;script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var json_region = [{"value":365,"label":"Calgary"},{"value":368,"label":"Canmore"},{"value":393,"label":"Edmonton"}] $(function() { $('#UserRegion').autocomplete({ source: json_region, selectFirst: true, select: function( event, ui ) { $('#RegionID').val( ui.item.value ); $('#UserRegion').val( ui.item.label ); return false; } }); }); &lt;/script&gt; &lt;script type="text/javascript" src="/Extras/urbannow.js/1"&gt;&lt;/script&gt; &lt;script src="/Assets/Scripts/jquery.ui.autocomplete.selectfirst.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/Assets/Scripts/wmd.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/Assets/Scripts/showdown.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js"&gt;&lt;/script&gt; &lt;script src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js"&gt;&lt;/script&gt; &lt;script src="/Assets/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p>And this is erroring </p> <pre><code>$('#UserRegion').autocomplete({ </code></pre> <p>The console says</p> <blockquote> <p>SCRIPT438: Object doesn't support this property or method</p> </blockquote> <p>And I just can't figure this one out.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload