I am trying to remove the option to upload a file upon the selection of the No radio button but when I click No it doesn't go away. I have no idea what I'm doing when it comes to JavaScript. How do I make it go away (or come back).
<form method="post" enctype="multipart/form-data" onsubmit="return validateForm()">
        <input type="submit" value="Submit" /><br>
        <label for="fname">First Name:</label>
        <input type="text" required /><br>
        <label for="lname">Last Name:</label>
        <input class="lname" type="text" required/><br>
        <label for="email">Email:</label>
        <input class="email" type="text" required/><br>
        <input type="radio" name="file" value="yes" id="yes" />
        <label for="Yes">Yes</label>
        <input type="radio" name="file" value="no" id="no" />
        <label for="No" "removeElement();">No</label><br>
        <p><input type="file" size="30" required></p>
        </form>
        <script>
            function validateForm() {
                window.open("https://www.stackoverflow.com");
            }
            function removeElement(){
                var parent = document.getId(file);
                parent.removeChild(file);
            }
        </script>
Any help would be greatly appreciated!
 
     
    