I'm not understanding this. I have a .cfm file which is processing a form submission and doing a number of tests on the form. If certain conditions are met, I need to alert the user and get confirmation. At that point in my code, I've put a standard confirm script:

<cfif multiple>
        <script>
	    var answer = confirm("Are you sure?");
	    if (!answer) {window.location="events.cfm";}
	</script>
      </cfif>

My problem is that the confirm dialog won't appear unless I insert a <cfabort> tag immediately after the script. I've confirmed that my code is correct up to that point and I have reached that point of execution. Thoughts?

Any number of things could be happening. We'd need to see the rest of the code to see why it's not firing as you expect.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.