title: Make a button activate JavaScript code
body: <p>What I would like to accomplish today is making a button activate JavaScript code. For example, lets take a code to make snow appear on the page. At first, the page doesn't have snow falling, but the code is in the page. Then the visitor clicks on the button and snow starts falling on the page. That's what I want it to do.</p>
  
  <p>Website to use on: <a href="http://gravitate.webs.com" rel="nofollow">http://gravitate.webs.com</a></p>
  
  <p>Snow Code:</p>
  
  <p>BEGINNING</p>
  
  <pre><code>&lt;!-- --&gt;
  &lt;script type="text/javascript" src="http://static.websimages.com/static/global/js/webs/usersites/escort.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
    if(typeof(urchinTracker)=='function') {
      _uacct="UA-230305-2";
      _udn="none"; 
      _uff=false;
      urchinTracker();
    }
  &lt;/script&gt;
  
  &lt;/body&gt;
  
  &lt;script language="JavaScript" src="http://www.ig33kstas.com/wp-content/plugins/wp-christmas/wp-christmas.js.php?swf=http://www.ig33kstas.com/wp-content/plugins/wp-christmas/wp-christmas-EN.swf"&gt;&lt;/script&gt;
  
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
    sitePath = "http://www.ig33kstas.com/wp-content/plugins/wp-christmas/";
    sflakesMax = 89;
    sflakesMaxActive = 64;
    svMaxX = 4;
    svMaxY = 5;
    ssnowStick = 1;
    sfollowMouse = 1;
  &lt;/script&gt;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>END</p>
  
  <p>What I tried that totally failed:</p>
  
  <pre><code>&lt;body&gt;
  &lt;button onclick="mysnowcode"&gt;Snow&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>