Uhmmmmm try renaming the "document" field to something else.  That might be
a reserved word.  Also, use real HTML, not CFFORM.

---mark

------------------------------------
Mark Warrick - Fusioneers.com
Personal Email: [EMAIL PROTECTED]
Business Email: [EMAIL PROTECTED]
Phone: 714-547-5386
Efax: 801-730-7289
Personal URL: http://www.warrick.net
Business URL: http://www.fusioneers.com
ICQ: 125160 / AIM: markwarric
====================================

> -----Original Message-----
> From: James Taavon [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 14, 2001 6:34 AM
> To: CF-Talk
> Subject: CFCONTENT Strikes Again...Viewing a file
>
>
> I have a three button form that gives a user the option to view, replace
> or delete a file. The latter two work just fine, but viewing the file is
> giving me an error and I am not sure why. It opens MSWORD and displays
> an error that it can't resolve the form variable. All the code looks
> right, but I am not I am not perfect. Any input would be appreciated.
>
> Thanks in advance.
>
> Error Occurred While Processing Request
> Error Diagnostic Information
>
> An error occurred while evaluating the expression:
>
>       #form.document# IS "View"
>
> Error near line 14, column 22.
>
>
> Error resolving parameter FORM.DOCUMENT
>
> The specified form field cannot be found. This problem is very likely
> due to the fact that you have misspelled the form field name.
>
> The error occurred while processing an element with a general identifier
> of (CFIF), occupying document position (14:1) to (14:32).
>
> Date/Time: 06/14/2001 09:27:09 AM
> Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Hotbar 2.0)
> Remote Address: 127.0.0.1
> Query String: id=10000
>
>
>
> FORM FILE (response2.cfm)
>
> <cfform name="documents" action="doc_action.cfm?id=#Trim(newdoc.id)#"
> method="POST">
> <input type="Submit" name="document" value="View">
> <input type="Submit" name="document" value="Replace">
> <input type="Submit" name="document" value="Detach">
> </cfform>
>
>
> ACTION FILE (doc_action.cfm)
>
> <cfquery name="Get" datasource="lsarprod">
>       select * from lsardba.tbl_response
>       where id = '#url.id#'
> </cfquery>
>
> <cfquery name="Submissions" datasource="lsarprod">
>       select * from lsardba.tbl_cases, lsardba.tbl_users
>       where   lsardba.tbl_users.fullname = lsardba.tbl_cases.assigned and
>               lid = '#url.id#'
> </cfquery>
>
> <cfif #form.document# IS "View">
>       <cfinclude template="view_doc.cfm">
> <cfelseif #form.document# IS "Replace">
>       <cfinclude template="upload2.cfm">
> <cfelseif #form.document# IS "Detach">
>       <cfquery name="Delete_Doc" datasource="lsarprod">
>               delete from lsardba.tbl_response
>               where id = '#url.id#'
>       </cfquery>
>       <font face="Arial" size="2"><strong>Document
> <cfoutput>#Trim(get.document)#</cfoutput> for Case number
> <cfoutput>#Trim(get.id)#</cfoutput> has been removed.</strong></font>
> <br>
> <br>
>
> <font face="Arial" size="2">
> <cfoutput>
> <a
> href="response.cfm?lid=#Trim(get.id)#&user=#UrlEncodedFormat(Trim(
submissions.username))#"><strong>Return</strong></a>
> </cfoutput>
> </font>
> </cfif>
>
>
>
> VIEW_DOC.CFM
>
> <cfquery name="Get" datasource="lsarprod">
>       select * from lsardba.tbl_response
>       where id = '#url.id#'
> </cfquery>
>
> <cfcontent type="application/msword"
> file="C:\Inetpub\wwwroot\Intranet-Secure\lsar_db2\responses\#Trim(
get.document)#">
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to