Hmmm....
Well, this is telling the browser to actually download the document. My only
thought would be to do an inline word document with a frameset and have a frame
at the top with your checkbox. I'm not exactly sure that's what you're looking
for or even the most portable solution, but it might work.
>Thanks
>
>
>
>I am using the following
>
>
>
><cfset user = listLast(cgi.REMOTE_USER,"\") >
>
><cfheader name="content-disposition"
>value="attachment;filename=testdoc.doc">
>
><cfcontent type="application/msword"
>file="#ExpandPath(".")#\testdoc.doc" deletefile="no">
>
>
>
>
>
>to display word docs, but what would be the best approach to check that
>the document has been opened and read by the user.
>
>
>
>Once read the user has to click a checkbox or link? that they have read
>the document. (Similar to an e-learning course website)
>
>
>
>In the document listing page, next to this document it will display
>'Read' with this information stored in the database for that user. If
>the user has opened the doc and not clicked the checkbox it will display
>'Doc Opened' next to that document on the webpage, and if they have not
>opened it, it will display 'Not Read'. Any ideas on the right approach
>for this?
>
>
>
>Or am I making this more complicated than it should be?
>
>
>
>I have set up a DB table with the following fields ID, Name, LoginID,
>Document, Status, Date
>
>
>
>For example when opening the doc via cfcontent how would I create a
>query to set the document name in the database, so it knows that users
>have either 'opened', 'read' or 'not read' the document and what would
>be the best way of setting the status of the document i.e. Opened, Read
>or Not Read? in the database to display next to the document listing
>
>
>
><cfquery name="LOOKUP" datasource="DS">
>
>SELECT Max(docid) NewdocID
>
>FROM docstatus
>
></cfquery>
>
>
>
><cfif lookup.newdocid is "">
>
><cfset docid = 1>
>
><cfelse>
>
><cfset docid = lookup.newdocid + 1>
>
></cfif>
>
>
>
><cfquery datasource="DS" name="insert ">
>
> INSERT INTO docstatus (docid, name, loginid, documents, status, date)
>
> VALUES (
>
><cfqueryparam cfsqltype="cf_sql_number" value="#linkid#">,
>
> <cfqueryparam cfsqltype="cf_sql_date" value="#user#">,
>
><cfqueryparam cfsqltype="cf_sql_varchar" value="#loginid#">,
>
>???????
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319382
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4