title: alert popup message doesn't show up
body: <p>So based on the inputs in this questionnaire, a pop up message containing the score variable should be displayed by clicking the submit button. For some reason is not happening. Where exactly is the problem? In visual studio code there is no error showing up but when i complete the questionnaire in my browser and press submit nothing happens.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;!doctype html&gt;
  
  &lt;html&gt;
  
  &lt;head&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
    &lt;h1&gt;Endometrial Cancer Predictor &lt;/h1&gt;
  
    &lt;h3&gt;What is your BMI?&lt;/h3&gt;
  
    &lt;input id="bmi1" type="radio" name="grp1" value="0"&gt; less than 25 &lt;/input&gt; &lt;br&gt;
  
    &lt;input id="bmi2" type="radio" name="grp1" value="1.85"&gt; 25 to 29 &lt;/input&gt; &lt;br&gt;
  
    &lt;input id="bmi3" type="radio" name="grp1" value="4.675"&gt; 30 to 39 &lt;/input&gt; &lt;br&gt;
  
    &lt;input id="bmi4" type="radio" name="grp1" value="6.175"&gt; over 40 &lt;/input&gt;
  
  
    &lt;h3&gt;Do you take contraception?&lt;/h3&gt;
  
    &lt;input id="contraNo" type="radio" name="grp2" value="0"&gt; No &lt;br&gt;
  
    &lt;input id="contraOral" type="radio" name="grp2" value="-0.8"&gt; Oral Contraception &lt;br&gt;
  
    &lt;input id="contraIud" type="radio" name="grp2" value="-1.2"&gt; Intrauterine Device (IUD)
  
  
    &lt;h3&gt;Do you take HRT?&lt;/h3&gt;
  
    &lt;input id="hrtNo" type="radio" name="grp3" value="0"&gt; No &lt;br&gt;
  
    &lt;input id="hrtConti" type="radio" name="grp3" value="-0.675"&gt; Continuous &lt;br&gt;
  
    &lt;input id="hrtNon" type="radio" name="grp3" value="0.5"&gt; Non Continuous
  
  
    &lt;h3&gt;Do you suffer from Type 2 Diabetes?&lt;/h3&gt;
  
    &lt;input id="diabYes" type="radio" name="grp4" value="1.375"&gt; Yes &lt;br&gt;
  
    &lt;input id="diabNo" type="radio" name="grp4" value="0"&gt; No
  
  
    &lt;h3&gt;Do you suffer from PCOS?&lt;/h3&gt;
  
    &lt;input id="pcosYes" type="radio" name="grp5" value="3.75"&gt; Yes &lt;br&gt;
  
    &lt;input id="pcosNo" type="radio" name="grp5" value="0"&gt; No
  
  
    &lt;h3&gt;What is your parity?&lt;/h3&gt;
  
    &lt;input id="nulliparity" type="radio" name="grp6" value="1.075"&gt; 0 &lt;br&gt;
  
    &lt;input id="parOver1" type="radio" name="grp6" value="-0.8"&gt; +1
  
    &lt;br&gt;
    &lt;br&gt;
  
    &lt;button id="btn1" onclick "fn1()"&gt;Submit &lt;/button&gt;
  
  
    &lt;script&gt;
      src = "index.js"
    &lt;/script&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>index.js</strong></p>
  
  <pre><code>function fn1()
  {
      var score=2.5;
      var bmi1 = document.getElementById("bmi1");
      var bmi2 = document.getElementById("bmi2");
      var bmi3 = document.getElementById("bmi3");
  
      var contraNo = document.getElementById("contraNo");
      var contraOral = document.getElementById("contraOral");
      var contraIud = document.getElementById("contraIud");
  
      var hrtNo = document.getElementById("hrtNo");
      var hrtConti = document.getElementById("hrtConti");
      var hrtNon = document.getElementById("hrtNon");
  
      var diabYes = document.getElementById("diabYes");
      var diabNo = document.getElementById("diabNo");
  
      var pcosYes = document.getElementById("pcosYes");
      var pcosNo = document.getElementById("pcosNo");
  
      var nulliparity = document.getElementById("nulliparity");
      var parOver1 = document.getElementById("parOver1");
  
  
      if(bmi1.checked==true) 
          score=score+bmi1.value;
      else if(bmi2.checked==true)
          score=score+bmi2.value;
      else if(bmi3.checked==true)
          score=score+bmi3.value;
      else if(bmi4.checked==true)
          score=score+bmi4.value;
  
      if(contraNo.checked==true) 
          score=score+contraNo.value;
      else if(contraOral.checked==true)
          score=score+contraOral.value;
      else if(contraIud.checked==true)
          score=score+contraIud.value;
  
      if(hrtNo.checked==true) 
          score=score+hrtNo.value;
      else if(hrtConti.checked==true)
          score=score+hrtConti.value;
      else if(hrtNon.checked==true)
          score=score+hrtNon.value;
  
      if(diabYes.checked==true) 
          score=score+diabYes.value;
      else if(diabNo.checked==true)
          score=score+diabNo.value;
  
      if(pcosYes.checked==true) 
          score=score+pcosYes.value;
      else if(pcosNo.checked==true)
          score=score+pcosNo.value;
  
      if(nulliparity.checked==true) 
          score=score+nulliparity.value;
      else if(parOver1.checked==true)
          score=score+parOver1.value;
  
  
         return score;
  
  }
  function displayResult() {
      var result = fn1();
      document.getElementById('btn1').innerHTML = result;
      return false;
  }
  </code></pre>