Does this work? (You�d need to add id="statusSelect" to your select box, and
I'm just guessing at the row number -- remember JS starts counting at 0).

<a = 6"
href="">
An alternative approach would be to use remote scripting to update the
select box every few seconds by querying the server. That may be cool but
would be much more work.

________________________________________
From: Steve Logan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 11 August 2004 10:37 a.m.
To: CF-Talk
Subject: forcing a page reload

I have a page that displays details about a document file on the system
(word doc).��The word doc has a status assigned to it (1-7) - such as
uploaded, downloaded, live, deleted etc.

There is a select pulldown on the details page that goes to the correct
status.

If you click on the resume filename, there's an href to a download.cfm page
which forces a file download box (I don't want it to display in browser) and
runs and update query to change the status to 7 (which is the status for
"downloaded").

Problem is, I can't get the status pulldown on the details page to update to
reflect the new status - even though download.cfm is running the query and
the status is being written to the page.

Here's some relevent code snippets:

details.cfm
-- link to download file ---
<a href="">
-- and the status select code --
<cfquery name="selStatus" datasource="#Session.DSN#">
��SELECT *
��FROM tblStatus
��WHERE display
</cfquery>
<select name="statusSelect">
���<cfloop query="selStatus">
������ <option value="#selStatus.status_id#"
���������<cfif selStatus.status_ID EQ��selResume.res_status>selected</cfif>>
���#selStatus.status_name#</option>
���</cfloop>
</select>

-- when you click on the link to download the file a select query is run to
get the file name, then an update to change the status to 7, and then
cfheader and cfcontent to do the download:

<cfquery name="selResume" datasource="#Session.DSN#">
��SELECT res_filename
��FROM tblResume
��WHERE res_id = <cfqueryparam value="#resID#" cfsqltype="CF_SQL_INTEGER">
</cfquery>
<cfquery name="updResume" datasource="#Session.DSN#">
��UPDATE tblResume
��SET res_status = 7,
������res_dla = #CreateODBCDateTime(Now())#
��WHERE res_id = <cfqueryparam value="#resID#" cfsqltype="CF_SQL_INTEGER">
</cfquery>
<cfset
session.mainuploadpath="C:\inetpub\users\dev\bronstein\files"><cfoutput><cfh
eader name="content-disposition" VALUE="attachment;
filename=#selResume.res_filename#">
<cfcontent type="application/octet-stream"
file="#session.mainuploadpath#\#selResume.res_filename#" Deletefile="no">
</cfoutput>

-- everything works there fine, except that the pulldown select on
details.cfm never gets "reloaded" to change the status - even though the
status ID is now 7.

I've tried all sorts of cflocation, and some basic _javascript_ but I can't
seem to get that details.cfm page to reload the select.

steve
________________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to