Thanks for the ideas. All I am after is when a user who will be authenticated by CF with the GAL I.E. <cfset user = listLast(cgi.REMOTE_USER,"\")>
If they have not read a document, on the docdisplay,.cfm page it will display next to the document listing 'not read', if they have opened the word doc and read it (could this be done by embedding a link to a cfm page in the word doc which would pass the users details to the database, and would set the status to 'viewed') i.e. ID, Name, LoginID, Document, Status, Date Then on the docdisplay.cfm page, next to the document it will display 'viewed' for that user.? Does this make sense, and is this the best way of implementing this? The problem I am having is in the link from the word doc to the cfm page to set the status and time etc, how could I do this? i.e. what parameters would I need to pass from the link in the word doc to the cfm page? Hope this makes sense? -----Original Message----- From: Robbie Byrd [mailto:[email protected]] Sent: 16 February 2009 20:47 To: cf-talk Subject: Re: Binary output in CFContent ? 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:319466 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

