Can anybody tell me what's wrong with this code?

Code:
function del(url) {
    c = confirm('Are you sure you want to delete "Location" ?');
    if (c == true) {
        window.location.href = url;
    }
}