Oki doki heres my answer:
HTML
<div id="popup" style="width:250px;height:250px;background-color:rgba(255,255,255,0.5);border:3px solid black;display:none;z-index:999;position:absolute;top:50%;left:50%;margin-left:-125px;margin-top:-125px;">
<div style="width:230px;height:230px;margin-left:10px;margin-top:10px;background-color:#FFFFFF;">
Thank you for submitting your details<p>
<div onclick="document.getElementById('popup').style.diplay='none';" style="margin-left:auto;margin-right:auto;width:75px;height:30px;background-color:#000000;cursor:hand;">
Close
</div>
</div>
</div>
Javascript
Change
alert("Your message has been sent! Thank you for getting in touch.");
to
document.getElementById("popup").style.display="block";