I don't understand why paragraph(demo) is not changing into "IT WORKS!!!"
Here is the script:

<html>
<body>

<script>

function submitinfo()

{
var firstname = document.getElementById("firstname").value;
var lastname = document.getElementById("lastname").value;
var middlename = document.getElementById("middlename").value;

alert("Hello " + firstname + " " + middlename + " " + lastname);

if (middlename == null);
{
getElementById("demo").innerHTML= "IT WORKS!!!";
}

}

</script>
First Name: ....<input type="text" id="firstname">
<br />
Middle Name: <input type="text" id="middlename">
<br />
Last Name: ....<input type="text" id="lastname">
<br />
<input type="button" value="Submit" onclick="submitinfo()">
<br />
<br />
<p id= "demo"></p>
</body>
</html>