I need to split the string result of the autocomplete plugin. I know how to split the string and what not, but don't know how to do it in context of the plugin. Here is what I have thus far. Any help would be greatly appreciated:
<script type="text/javascript">
$(document).ready(function() {
$('.divAutoComplete').autocomplete("LookupCodes.aspx?type=IC", { mustMatch: true });
});
</script>
EDIT: I have changed it as follows and now Firebug is barking at me, saying that "value.replace is not a function" (the error is in the plugin script). Not sure what I'm doing wrong:
<script type="text/javascript">
$(document).ready(function() {
$('.divAutoComplete').autocomplete("LookupCodes.aspx?type=IC", { mustMatch: true, formatItem: formatItem });
});
function formatItem(row) {
var a = row[0].toString().split('--');
return a;
}