title: How to add a button to questionnaire
body: <p>How do I make a button that is light in color and unclickable until a user answers all 3 questions and when that happens the button lights up and is clickable. The button generates the links that are already within the code and it takes them to the desired page.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;script&gt;
  function tryToMakeLink()
  {
      //get all selected radios
      var q1=document.querySelector('input[name="q1"]:checked');
      var q2=document.querySelector('input[name="q2"]:checked');
      var q3=document.querySelector('input[name="q3"]:checked');
      //make sure the user has selected all 3
      if (q1==null || q2==null ||q3==null)
      {
          document.getElementById("linkDiv").innerHTML="--";
      }
      else
      {
          //now we know we have 3 radios, so get their values
          q1=q1.value;
          q2=q2.value;
          q3=q3.value;
          //now check the values to display a different link for the desired     
  configuration
          if (q1=="AT&amp;T" &amp;&amp; q2=="8GB" &amp;&amp; q3=="Black")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;att 8gb black&lt;/a&gt;";
          }
          else if (q1=="Other" &amp;&amp; q2=="8GB" &amp;&amp; q3=="White")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;other 8b 
  white&lt;/a&gt;";
          }
          else if (q1=="AT&amp;T" &amp;&amp; q2=="16GB" &amp;&amp; q3=="White")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;another     
  option&lt;/a&gt;";
          }
          else if (q1=="AT&amp;T" &amp;&amp; q2=="16GB" &amp;&amp; q3=="Black")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;oops&lt;/a&gt;";
          }
          else if (q1=="AT&amp;T" &amp;&amp; q2=="8GB" &amp;&amp; q3=="White")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;can't&lt;/a&gt;";
          }
          else if (q1=="Other" &amp;&amp; q2=="8GB" &amp;&amp; q3=="Black")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;yours&lt;/a&gt;";
          }
          else if (q1=="Other" &amp;&amp; q2=="16GB" &amp;&amp; q3=="White")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;mines&lt;/a&gt;";
          }
          else if (q1=="Other" &amp;&amp; q2=="16GB" &amp;&amp; q3=="Black")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;what&lt;/a&gt;";
          }
          else if (q1=="Unlocked" &amp;&amp; q2=="8GB" &amp;&amp; q3=="White")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;red&lt;/a&gt;";
          }
          else if (q1=="Unlocked" &amp;&amp; q2=="8GB" &amp;&amp; q3=="Black")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;orange&lt;/a&gt;";
          }
          else if (q1=="Unlocked" &amp;&amp; q2=="16GB" &amp;&amp; q3=="White")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;green&lt;/a&gt;";
          }
          else if (q1=="Unlocked" &amp;&amp; q2=="16GB" &amp;&amp; q3=="Black")
          {
              document.getElementById("linkDiv").innerHTML="&lt;a href=#&gt;blue&lt;/a&gt;";
          }
      }
  }
  &lt;/script&gt;
  
  &lt;form name="quiz" id='quiz'&gt;
  
  What carrier do you have?
  &lt;ul style="margin-top: 1pt"&gt;
      &lt;li&gt;&lt;input type="radio" onclick=tryToMakeLink(); name="q1" value="AT&amp;T"/&gt;AT&amp;T&lt;/li&gt;
      &lt;li&gt;&lt;input type="radio" onclick=tryToMakeLink(); name="q1"  
  value="Other"/&gt;Other&lt;/li&gt;
      &lt;li&gt;&lt;input type="radio" onclick=tryToMakeLink(); name="q1" 
  value="Unlocked"/&gt;Unlocked&lt;/li&gt;
  &lt;/ul&gt;
  
  What is your phones capicity?
  &lt;ul style="margin-top: 1pt"&gt;
      &lt;li&gt;&lt;input type="radio" onclick=tryToMakeLink(); name="q2" value="8GB"/&gt;8GB&lt;/li&gt;
      &lt;li&gt;&lt;input type="radio" onclick=tryToMakeLink(); name="q2" value="16GB"/&gt;16GB&lt;/li&gt;
  &lt;/ul&gt;
  
  What color is your phone?
  &lt;ul style="margin-top: 1pt"&gt;
      &lt;li&gt;&lt;input type="radio" onclick=tryToMakeLink(); name="q3" 
  value="Black"/&gt;Black&lt;/li&gt;
      &lt;li&gt;&lt;input type="radio" onclick=tryToMakeLink(); name="q3" 
  value="White"/&gt;White&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;br&gt;
  &lt;div id=linkDiv&gt;
   ---
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/ekcKW/" rel="nofollow">http://jsfiddle.net/ekcKW/</a></p>