jquery - Correct Javascript syntax for concatenation -


i trying pull locations using foursquare api, , seemingly not writing syntax correctly.

 address = '<p><a href="http://maps.google.com/?q="' +   venues.location.address + '">' +   venues.location.address + '</p>'; 

although not throwing error, results in following code:

<a href="http://maps.google.com/?q=">correct business name</a> 

the point is, query string google maps uses missing, , showing correctly in link text. doing wrong concatenation / syntax?

try this:

address = '<p>' +     '<a href="http://maps.google.com/?q=' +     encodeuricomponent(venues.location.address) +     '">' +     venues.location.address +     '</p>'; 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -