James,
On the form page you named the submit button "docu" on the action page you
are referencing "doc". It should be "form.docu"
Best Regards,
Dennis Powers
UXB Internet
(203) 879-2844
http://www.uxbinfo.com/
-----Original Message-----
From: James Taavon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 9:44 AM
To: CF-Talk
Subject: Repost: CFCONTENT Strikes Again...Viewing a file
Reposting due to Mail hickup...If anyone responded to this, I never got
it.
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.doc IS "View"
Error near line 14, column 22.
Error resolving parameter FORM.DOC
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 action="doc_action.cfm?id=#Trim(newdoc.id)#"
method="POST">
<input type="Submit" name="docu" value="View">
<input type="Submit" name="docu" value="Replace">
<input type="Submit" name="docu" value="Detach">
</cfform>
ACTION FILE (doc_action.cfm)
<cfquery name="GetDoc" 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.doc IS "View">
<cfinclude template="view_doc.cfm">
<cfelseif form.doc IS "Replace">
<cfinclude template="upload2.cfm">
<cfelseif form.doc 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(submission
s.username))#"><strong>Return</strong></a>
</cfoutput>
</font>
</cfif>
VIEW_DOC.CFM
<cfquery name="GetView" 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(getview.do
cument)#">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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