Try using the JSStringFormat function (JavaScript String Format):
eg: <cfset httpreferer="#JSStringFormat(error.HTTPReferer)#">
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Marc J.
Mataya
Sent: Wednesday, 1 August 2001 3:18 PM
To: CF-Talk
Subject: Emailing Errors Automatically
CFUG,
When my app has a user error, error.cfm is called using CFERROR. Since you
cannot execute any functions in this page such as CFMAIL, I am simply
redirecting the error.cfm using JavaScript to another page that will
successfully CFMAIL me. See the code below.
The problem is that the diagnostics contains both single and double quotes
which chops off the messages due to the code below seeing the first double
quote. I cannot use REPLACE( ) since functions cannot be performed in the
error.cfm page. So, how can I get my app to email me when there was an
error, or is there another way to check a log of some sort?
PS. This code works great if there are no double-quotes in the diagnostics.
<html>
<head>
<title>Error Redirect</title>
</head>
<body onload="frmError.submit();">
<font face="Tahoma" size="2">
<cfoutput>
<form name="frmError" action="errormail.cfm" method="post">
<input type="hidden" name="browser" value="#error.browser#">
<input type="hidden" name="datetime" value="#error.datetime#">
<input type="hidden" name="httpreferer" value="#error.HTTPReferer#">
<input type="hidden" name="querystring" value="#error.QueryString#">
<input type="hidden" name="diagnostics" value='#error.diagnostics#'>
</form>
</cfoutput>
</font>
</body>
</html>
Thanks,
Marc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists