Thanks guys...


Isaac your solution works just fine with the location...


Pat

  _____  

From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: August 30, 2004 22:23
To: CF-Talk
Subject: Re: redirect after cfheader/cfcontent

> I have a code on a page that pop up a save/open for
> downloading a page :

> <cfheader name="Content-Disposition"
> value="attachment;filename=#getfilefrompath(cas.fichier)#">
> <cfcontent file="#nom_fichier2#"
> type="application/pdf"
> deletefile="No" />

> And I want to redirect the page to another page after
> this.. how could I do
> this? I'm on CF5 and I tried a cflocation after those 2
> tags but it didn't
> work.

Hi Pat,

That's a pickle... afaik cfheader wouldn't normally prevent you from
using cflocation, however, I believe cfcontent flushes the content
(the file) to the browser immediately, at which point you can no
longer use cfheader or cflocation due to the fact that both of these
rely on the creation of http headers to function. (Once any content is
flushed to the browser, all http headers have already been flushed
along with it.) You may or may not be able to use the cflocation tag
before the cfcontent tag -- I wouldn't bet on it. And you may or may
not be able to use _javascript_ (location.replace()) after the cfcontent
tag to relocate the browser - again, I wouldn't bet on it.

What is the next page you're relocating to? Is it another file
download or a "thanks for downlaoding" page? If the latter, I would
say I think there may be a better approach to the html, you might try
this:

<a > href="" target="_blank">download</a>

hth

s. isaac dealey     954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to