title: Javascript inside of Javascript Popups
body: <p>I'm using the alert function to create a popup and I was wondering if there was a way to stick script in the popup. For example, I want to make a Google ad popup. My thoughts for it would be that the popup, instead of displaying text, would display a function. The function it'd use, 'displayAd()' for example, would just be run in the popup. Here is my code I'm thinking of.</p>
  
  <pre><code>&lt;script&gt;
  
  function displayAd()
  {
  //My Google adsense code
  }
  
  function init()//Will occur on page load.
  {
  alert(displayAd());
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I don't believe that'll work, but I'd like input. Thanks.</p>