Skip to main content
gokul1242
Inspiring
May 6, 2013 9:39 AM UTC
Question

How to redirect to the same page ?

i am using the following code to open a file on a cfm page ie.,when user clicking on a hyperlink it opens the cfm page and displays the pop up to save the file 

<cfif isdefined("url.isemailPopUP") and trim(url.isemailPopUP) eq "Y">


<cfif isdefined("url.fileName")>

<cfif #find(url.fileName,#fileWithThePath#,1)#>


<cfheader name="Content-Disposition" value="attachment; filename=#url.fileName#">

<cfcontent type="text/plain" file="#fileWithThePath#"> 

</cfif>

</cfif>

</cfif>

but after the file has been downloaded .it does not displays the contents of the page or  redirects to the same page ....

i have used cflocation. but it does not help....

    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    Legend
    May 7, 2013 3:33 PM UTC

    You can't. Downloaded files do not do html or script processing, they only download the file. In some cases you can use the "target" parameter to spawn a child window when the user clicks the link for the download, but depending on the browser this will work perfectly or come across as bulky because a stray empty window will be left behind.

    Translate