suggestions3a.js
I had a question about the StateSuggestion() function. I'm using this entire autosuggest_Part3 (part a) as the base for my own code. I'm actually using manager names instead of states. I've written code that includes an xml DOM to pull server-side data and create javascript like below.
(ORIGINAL)
function StateSuggestions() {
this.states = [
"Alabama", "Alaska", "Arizona", etc..
];
}
(MY CODE)
ManagerSuggestions = "this.manager = [" + aManagerName + "];"
alert(ManagerSuggestions);
The problem is the alert box actually creates an alert popup like the original code and eventually looks like:
this.manager = [
"FIRSTPERSON_LN, FIRSTPERSON_FN",
"SECONDPERSON_LN, SECONDPERSON_FN",
"SECONDPERSON_LN, SECONDPERSON_FN"
];
but it doesn't work bc as soon as I type into the textbox where the autosuggest control should fire from, I get this error that reads:
'this.managers.length' is null or not an object
HELP!
|