Hi,
I have been working on creating a TypeAheadSuggest component using the Refactored version of yours in Chapter 10. I downloaded your source files from the website and got it all working with the XML no problem.
One thing I noticed though, was that the prototype.js file that came with your source code was a bit old (version 1.3.1), so I tried replacing it with the latest version (1.5.1.1). However when I did I started getting an error message (in Firebug) saying ".extend() is not a function". I had to go back to the old version of prototype.js.
I looked at the two versions side by side, but could not work out what was causing the problem. Have you any ideas?
The part of the code triggering the error was this bit:
setOptions: function(options) {
this.options = {
suggestDivClassName: 'suggestDiv',
suggestionClassName: 'suggestion',
matchClassName : 'matchedtext',
matchTextWidth : true,
selectionColor : '#b1c09c',
matchAnywhere : false,
ignoreCase : false,
count : 10
}.extend(options || {}); <--------------------------------------- error
},
Great book by the way. I just getting into AJAX, and the your book has been a fantastic help.
|