Js, html; I'm starting to suspect I might be stupid

hello folks! could anyone take a look at this code, and tell me why my function won’t display an error mesage inside the designated p-element? (actually it does, but it just flashes it, and it’s gone the next second) could someone please tell me what am I doing wrong, thanks…

<!DOCTYPE html>
<html lang="en">
<title>Survay Form</title>
<meta charset="utf-8">
<meta name="viewport" width="device-width, initial-scale=1.0">
<link rel="stilesheet" href="survay.css">


        <h1 id="title">Survay Form</h1>
        <p id="description">a form that survays...</p>
    <form id="survey-form">
        <label id="name-label">
<input id="name" type="text" placeholder="your name" required>
<label id="email-label">
<input id="email" type="email" placeholder="your email" required>
<label id="number-label">
<input id="number" type="text" placeholder="age (optional)">
<p id="eRr"></p>
        <select id="dropdown">
                <option>option 1</option>
                <option>option 2</option>
                <option>option 3</option>
                <option>option 4</option>

        <label for="aAA">
            <input id="aAA" type="radio" value="aAA" name="aAa">aAA
        <label for="AaA">
            <input id="AaA" type="radio" value="AaA" name="aAa">AaA
        <label for="AAa">
            <input id="AAa" type="radio" value="AAa" name="aAa">AAa
        <label for="bBB">
            <input id="bBB" type="radio" value="bBB" name="bBb">bBB 
        <label for="BbB">
            <input id="BbB" type="radio" value="BbB" name="bBb">BbB 
        <label for="BBb">
            <input id="BBb" type="radio" value="BBb" name="bBb">BBb
                <label for="xXX">
                    <input id="xXX" type="checkbox" value="xXX" name="xXx">xXX
                <label for="XxX">
                    <input id="XxX" type="checkbox" value="XxX" name="xXx">XxX
                <label for="XXx">
                    <input id="XXx" type="checkbox" value="XXx" name="xXx">XXx 
                <label for="zZZ">
                    <input id="zZZ" type="checkbox" value="zZZ" name="zZz">zZZ
                <label for="ZzZ">
                    <input id="ZzZ" type="checkbox" value="ZzZ" name="zZz">ZzZ
                <label for="ZZz">
                    <input id="ZZz" type="checkbox" value="ZZz" name="zZz">ZZz
             <label class="myTextArea">post your comments and sugestions<br>
                 <textarea class="user-comments"></textarea>
             <button onclick="checkTheValue()" type="submit">submit</button>
         <script src="survay.js"></script>
function checkTheValue(){

var message,x;


message =document.getElementById(“eRr”);


try {

if (isNaN(x)) throw “is not a number”;

if ((x).value == “”) throw “is empty”;

if ((x).value >9) throw “is too high”;

if ((x).value <1) throw “is too low”;


catch(err) {

message.innerHTML= "Input value " + err;


I do not have a clue, but some errors disappears when changing ” to "



Press Tidy to show errors

thank you, I never noticed that…