title: How to change paragraph text in Javascript? (using values from radio buttons).(onclick event possibly not firing)
body: <p>Basically, on my website I am attempting to have the option to choose between English and Spanish. How this would work is there would be two radio buttons, one for each language, and a button. When the button is pressed, the text of the paragraphs should be changed depending on the radiobutton that is checked. I have code which in my opinion should be valid but yet doesn't work.</p>
  
  <pre><code>&lt;!DOCTYPE HTML SYSTEM&gt;
  &lt;html&gt;
  
  &lt;head&gt;
  
      &lt;script type="javascript"&gt;
          function ChangeLanguage()
          {
              try
              {
                  if(document.Radio.rbEnglish.checked)
                  {
                      document.getElementById("p1").innerHTML = "OF COURSE!";
                  }
                  else
                  {
                      document.getElementById("p1".innerHTML = "CLARO!";
                  }
              }
              catch (err)
              {
                  alert(err.message);
              }
              return false;
          }
  
      &lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;form name="Radio"&gt;
  
      &lt;fieldset&gt;
  
          &lt;p&gt;
  
              &lt;input id="rbEnglish" name="rbLanguage" type="radio" checked="checked" value="English"/&gt;
  
              &lt;label for="rbEnglish"&gt;English&lt;/label&gt;
  
              &lt;input id="rbSpanish" name="rbLanguage" type="radio" value="Spanish"/&gt;
  
              &lt;label for="rbSpanish"&gt;Spanish&lt;/label&gt;
  
              &lt;input id="btnSubmit" type="submit" value="Submit" onclick="return ChangeLanguage();"/&gt;
  
          &lt;/p&gt;
  
      &lt;/fieldset&gt;
  
      &lt;/form&gt;
  
      &lt;p id="p1"&gt;
  OF COURSE!
      &lt;/p&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>After some tampering it seems to me that the "onclick" event isn't working for some reason but I can't tell why. Please help either by correcting this code or offering alternative code.</p>