Search code examples
asp.netprototypejsscriptaculous

Protoype/Scriptaculous Autocomplete


I am getting this error when trying to select a object in my autocomplete

This only comes up in IE 8, and Firefox 3.5, not IE 7 or FF 3.0

Error: uncaught exception: [Exception... "An invalid or illegal string was specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)" location: "http://localhost/js/prototype.js Line: 2853"]

P2N.Submission.autoSuggest.init('', 'place-list', 'hiddenPlaceID', '/placeSearch.ashx?cityID=&allowNewPlace=', 'place-search-spinner', {resultID : '' });

Update: p2n is

var P2N = {
    returnVal: null, 
    errorMsg: null,
    initWindow: function() {
    },
    addSpinner: function(el) {
        if(!$(el).next('img.spinner'))$(el).insert({after: '<img src="/img/spinner_small.gif" alt="" class="spinner" />'})
    },
    removeSpinner: function(el) {
        var spinner = $(el).next('img.spinner');
        if (spinner != null) spinner.remove();
    }

autoSuggest.init I believe is prototype version 1.6, and Scriptaclous vers 1.8 While they also are loading jquery ver 1.3.2 I believe it may be a conflict in all of these, but why would it work in older browsers?

};

Solution

  • We had the same problem - it's definitely a bug in prototype.js 1.6.0.x. Upgrading to 1.6.1 fixed it.