JQuery Autocomplete issue with .net mvc-Collection of common programming errors

I’m having a problem using autocomplete in conjunction with other javascript libraries that I need in my project.

When I run this simple example it works fine in the first time. It shows the autocomplete window perfectly, but if I try to change the word I’m typing it generates this error in Chrome:

Uncaught ReferenceError: pos is not defined on the file jquery-1.4.4-vsdoc.js:2495

This is the code:

$(function () {
        var availableTags = [
          "ActionScript",
          "AppleScript",
          "Asp",
          "BASIC",
          "C",
          "C++",
          "Clojure",
          "COBOL",
          "ColdFusion",
          "Erlang",
          "Fortran",
          "Groovy",
          "Haskell",
          "Java",
          "JavaScript",
          "Lisp",
          "Perl",
          "PHP",
          "Python",
          "Ruby",
          "Scala",
          "Scheme"
        ];
        $("#txtPesquisar").autocomplete({
            source: availableTags
        });
    });

and I lead all these javascripts in my master page for my project.

I don’t know why I get this error.



      
  


        

 
 



             
--%>


     

    




I red something here in the forum it could be a postback functions but I don’t know how to figure it out.

Thanks for your help

  1. did you notice? the file vsdoc it’s a little bit older than jQuery version, even you should remove the vsdoc.js from the runtime version.

    if open the vsdoc you can find with this note.

     /*
     * This file has been commented to support Visual Studio Intellisense.
     * You should not use this file at runtime inside the browser--it is only
     * intended to be used only for design-time IntelliSense.  Please use the
     * standard jQuery library for all production use.
     *
     * Comment version: 1.4.4a
     */
    

Originally posted 2013-12-02 20:56:26.