Hi

Please could you assist I have made a validaion. But when the correct field is not entered properly. Validation works but the javascript pop does show please see code below.

  <CFIF email IS (find("@",address)) neq 1>
    <CFLOCATION URL="error.cfm?PassedError=Please%20Supply us email address.">
    <CFABORT>
    <script type="text/javascript">
alert('Please Check Your Email');
</script>

Please help
Thanks

Cflocation wins that round. You might to do the alert(''); window.location combo using javascript. that's what I do

You need to put an end if after the cfabort. Your pop up should work after that.

It doesn't make sense to use both in the same block. As jsmall26 said cflocation always wins because it runs first - on the server. The browser never even sees the javascript.

The javascript belongs on the form page. It should execute before the form is submitted. Save the cflocation for the action page - as b/u validation.

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.