Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 128
  • Last Modified:

Code works in IE but not netscape

I'm trying to allow people to download exe files from my site.
I'm using the code below:

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

<cfcontent type="application/unknown" file="software\#URLDecode(url.id)#" deletefile="No" >

It works fine in IE6 but dose not work in NN6 (says there is no function named URLDecode)

Can anyone help..

Thanks
0
andy98
Asked:
andy98
  • 2
1 Solution
 
anandkpCommented:
Hi there,

i use the following code

the only diff u would notice is that i initialise the variable before using it in CFCONTENT.

ie CFSET SPATH = "software\#URLDecode(url.id)#"

---------------------------------------------------

<!--- file_to_be_download.cfm - Name of file to be downloaded. --->    
     <CFHEADER NAME="content-disposition" VALUE="attachment; filename=#SFILENAME#">
     
     <!--- get teh physical [c:\asdas\asda\asdas.cfm] path for the file to be downloaded. --->
     <CFCONTENT TYPE="application/octet-stream" FILE="#SPATH#" DELETEFILE="FALSE" RESET="TRUE">

------------------------------------------------------

see if this helps
let me know

K'Rgds
Anand
0
 
andy98Author Commented:
Still dose not work (with NN at least)
here is my code and let me know if I'm doing something wrong


<CFSET SPATH = "d:\mysite\download\software\#URLDecode(url.id)#">

---------------------------------------------------

<!--- file_to_be_download.cfm - Name of file to be downloaded. --->    
    <CFHEADER NAME="content-disposition" VALUE="attachment; filename=#url.id#">
   
    <!--- get teh physical [c:\asdas\asda\asdas.cfm] path for the file to be downloaded. --->
    <CFCONTENT TYPE="application/octet-stream" FILE="#SPATH#" DELETEFILE="FALSE" RESET="TRUE">
0
 
andy98Author Commented:
I did change the relative path and worked fine.
thanks
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now