title: Javascript, redirect to a link retrieved by a function?
body: <p>Right now I'm showing an href that redirects to a certain location, I want to redirect automatically to the same link but don't know how. </p>
  
  <p>This is the link:</p>
  
  <pre><code>&lt;script&gt;
  document.write('&lt;a href="?s=' + geoip_city() + '"&gt; Go &lt;/a&gt;');
  &lt;/script&gt;
  </code></pre>
  
  <p>I tried with window.location but I'm messing somehow since I go literally to the name of the function.</p>
  
  <p>How should I do it? Thanks</p>