I cannot figure out why my form onsubmit function isn't working at all. I am trying to create a form that validates a confirmation password, but I cannot get the onsubmit to call the function I created, although it seems to be written correctly.

```
<div class="container">
                <h2 class="py-2 page_title">Change Password for <%= user.username %>:</h2>
                <form onsubmit="return confirm_password();" class="form_content" action="/users/edit_password/<%= user._id %>?_method=PUT" method="POST">

                    <div class="row">
                        <div class="form-group col-lg-12">
                            <input class="form-control" name="user[old_password]" placeholder="Old Password" type="password">
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group col-lg-12">
                            <input id="password" class="form-control" name="user[new_password]" placeholder="New Password" type="password">
                        </div>  
                    </div>
                    <div class="row">       
                        <div class="form-group col-lg-12">
                            <input id="confirm_password" class="form-control" name="user[confirm_password]" placeholder="Confirm Password" type="password">
                        </div>              
                    </div>

                    <button id="button" class="button zoom" type="submit">Submit</button>
                </form>
            </div>

```

The Function

```
function confirm_password(){
    console.log("working");  //This doesn't happen, so I know it isn't even being called
    if (document.getElementById("password") != document.getElementById("confirm_password")){
        alert("Passwords Do Not Match");
        return false;
    }
    return true;
}

```

I have added an alert("working"); into the file to confirm that it is connected, and I am getting the alert. However, after clicking submit, the console is telling me that "confirm\_password" is not a function. I have also tried adding a click listener to the button itself, and this too does not work either. Is there something obvious I am just missing? I have tried adding the script tag in the header and footer and this does not seem to change anything. 

Thanks.