I'm working on a "Document Depo" for pdf storage (using Coldfusion CFFILE tags to upload/move/save ...blah. blah...)

If a client tries to load a document into the system that has the same filename of an existing file, I wish to give them the option to overwrite or cancel out.

Coldfusion checks for the existing file, and if it's there, I do this:

<script type="text/javascript">
var OverWrite=confirm("Another File with This Name Already Exists. Overwrite It?")
if (!OverWrite)
history.go(-1);
</script>

The problem is - hitting cancel works - it takes them back to the form and they can chose what to do from there.
Hitting "OK" ... I need the page to continue to process ... but it's not. It just stops there and doesn't do anything else.

What am I missing from my javascript above?

Thanks ...