Here is code:

```
<form  method="post" id="cp_ind_form">

    // lots of input fields!
    <input type="submit" name="update_submit" value="Update"  />
    <input type="submit" name="delete_submit" value="Delete"  onclick="deleteConfirm()" />

</form>

```

**scripts.js** (confirmed that this file is connected to above page)

```
(function deleteConfirm() {
    var s = document.getElementById('confirm');
    s.onchange = function() {
        var yes = confirm('Do you really want to delete this location?');
        if (yes) { 
            var f = document.getElementById('cp_ind_form');
            f.submit();
        }
    }
})();

}

```

This is driving me insane. Such a basic function is not working here? I am basically copying it from other code that I have that DOES work, and this is no different. Can someone confirm if I am missing a small detail?