title: Wordpress: Outputting shortcode with Javascript?
body: <pre><code>&lt;script language=”javascript”&gt;
  if (country_code==’US’)
  {
  document.write("[adrotate banner="1"]");
  }
  else
  {
  document.write("[adrotate banner="2"]");
  }
  &lt;/script&gt;
  </code></pre>
  
  <p><code>[adrotate banner="x"]</code> are wordpress shortcodes used for the Adrotate plugin</p>
  
  <p>This script doesen't work because somehow outputting <code>[adrotate banner="x"]</code> is not possible?
  It uses the globally saved variable <code>country_code</code>.</p>
  
  <p>I've tried with both <code>"</code> and <code>'</code> (and the inner using one of them and the outer the other), but with no luck.</p>
  
  <p>Any way to work around this and still use JS?</p>