I am writing some JavaScript that what I essentially want to do is confirm when a user clicks a link that they do actually want to click it.
My code currently looks
You have to prevent the execution of the default event handler.
See How to use Javascript's addEventListener() to override an HTML Form's default submit() behavior
--EDIT--
We'll, I've seen you've answered yourself while I was editing the answer