If you want javascript to raise an error, you'll have to

<cfif errorHappened>
    <cfoutput>
        <script language="javascript">
          alert("Oh noes");
        </script>
    </cfoutput>
</cfif>

in addidtion to maybe sending a http error code. Http error code with 
tell the browser something went wrong, and the body of the page will 
make it look nice for the user.

Take this further,
if(errorHappened){
    redirectToErrorPage(reason)
}
is more what I would do.

AJ Mercer wrote:
> I would like to return an error code to the browser that will be 
> trapped by JavaScript.
>
> This is what I have at the moment - but doesn't seem to be doing what 
> I am after
>
> <cfif ErrorOfSomeSort>
>     <cfheader statuscode="400" statustext="Bad Request" />
>     <cfabort />
> </cfif>  
>
> Any suggestions would be greatly appreciated.
>
>  
> >

-- 
Haikal Saadh
Applications Programmer
ICT Resources, TALSS
QUT Kelvin Grove


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to