<script type="text/javascript">
$(document).ready(function() {
$('input#zip').autocomplete({
var cityAndState = joinedValues.split("|")[1];
dataType: "json",
source: "../src/php/registration/getFanLoc.php",
minLength: 3,
select: function(event, args) {
event.preventDefault();
var joinedValues = args.item.value;
var id = joinedValues.split("|")[0];
var cityAndState = joinedValues.split("|")[1];
document.getElementById('actualZip').value = id;
document.getElementById('zip').value = cityAndState;
}
});
});
</script>
JavaScript Console in FF is throwing this error:
missing : after property id
[Break On This Error]
var cityAndState= joinedValues.split("|")[1];
How do I fix this? I’m a bit confused and really appreciate some help.
As the error is trying to tell you:
cannot appear in an object literal.