It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

HTML Delete Option

HTML Delete Option

Postby dominicbelfiori on Thu Mar 18, 2010 1:52 pm

Hey guys, i've been trying to figure this out for the last few days, and am still having some troubles.
When i hit the delete button, it removes the file, but prompts me with an error.
Any suggestions?
here is some of the code
________________

<CFSET SendFileTo = "C:/inetpub/wwwroot/test.com/">
<CFPARAM NAME="Action" DEFAULT="">
''
<CFIF Action IS "">
<!---Get all the files in the current directory--->
<cfdirectory directory="#SendFileTo#" name="dirQuery" action="LIST" FILTER="*.pdf" sort="Name, Type">
''
<!---If the "Delete" link has been clicked, then remove the file that was passed in the URL string--->
<CFIF Action IS "Delete">
<cffile action = "delete"
file = "#SendFileTo##FileName#">
<P style="color: red;"><b>File has been successfully removed on the server.</P><b/>
''
<cfoutput query="dirQuery">

<CFIF name IS NOT "upload.cfm">
<tr>
<td><a href="#cgi.SCRIPT_NAME#?action=delete&fileName=#name#">[ Delete ]</a></td>
<td><A href="http://www.test.com/#name#">[ View/Download ]</a></td>
<td>#name#</td>

</tr>
dominicbelfiori
 
Posts: 1
Joined: Thu Mar 18, 2010 1:44 pm

Who is online

Users browsing this forum: No registered users and 8 guests