title: Function - Button Only Displayed After Another Is Clicked?
body: <p>I'm not good at all with functions, and learning JavaScript, I need a little help on one of the examples I'm making to learn it. I have a question. How do I make it so that the next button is shown only when the one before it is clicked? (For example, you can't see the Yahoo button without clicking Google first) Here's the code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  function show_prompt()
  {
  var name=prompt("Your Name");
  if (name!=null &amp;&amp; name!="")
    {
    alert("Thanks for clicking! You will now be redirected to Google.com");
    window.open("http://www.google.com/"};
  }
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  function show_alert()
  {
  alert("Thanks for clicking me! You are now going to Yahoo.com!");
  window.open("http://www.yahoo.com");
  }
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  function show_alert1()
  {
  alert("Thanks for clicking. Have fun on facebook!");
  window.open("http://www.facebook.com/");
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;input type="button" onclick="show_prompt()" value="Google" /&gt;
  &lt;li&gt;&lt;input type="button" onclick="show_alert()" value="Yahoo" /&gt;
  &lt;li&gt;&lt;input type="button" onclick="show_alert1()" value="Facebook" /&gt;
  &lt;/ul&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>