title: Is there a way to pass javascript variables in url?
body: <p>Is there a way to make the below script pass the javascript values to the url of the href link?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function geoPreview(lat,long) {
  var elemA = document.getElementById("lat").value;
  var elemB = document.getElementById("long").value;
  
  window.location.href = "http://www.gorissen.info/Pierre/maps/googleMapLocation.php?lat=elemA&amp;lon=elemB&amp;setLatLon=Set";
  
  }
  &lt;/script&gt;
  </code></pre>