Reputation: 43
what is wrong with this code? lines 2 and 7 apparently have errors? Thanks
var location = Appery ('input').val();
if (location == '') {
alert ('Please enter a location.');
return;
}
var map = Appery('map');
map.options['address'] = location;
map.refresh();
Upvotes: 0
Views: 82
Reputation: 22571
You cant use name location
for your variable!
The Window.location is read-only property, returns a Location object with information about the current location of the document.
Change it to something different:
var appery_loc = Appery('input').val();
Upvotes: 1