I have a street input field with JQuery ui autocomplete suggestions. After the user selected one of the suggestions, he should enter the number. Then on number blur a function validates with below autocomplete search function if the street is in the suggestions. If yes, an other function should be called. I can't call the other function.
Here is my code:
$("#street").autocomplete({
source: "street.php",
minLength: 2,
search: function (event,ui) {
//Return to input field
if (ui.item==null)
{
alert("Please select a street.");
$("#street").focus();
return;
} else{
//call an outside function,
//does not work
address-search();
}
}
});
Thank you in advance for help for solving this problem.