How do I upload online document to a list on intranet. I have made a NewDocument.cfm . This is going on the Administrator section. From where I add a document, entring its name, department, description, a browse button that will attach the doc and a submit button. I have written following code for it. I don't know how to code Upload.cfm . Besides, when I want to add that document, I want to add a checkbox with that so I am able to delete it. For general users, I just want to show the list of documents. How do I do that? another thing I need to show an image besides the doc to. I have written the code for it too in documents.cfm. But I don't know how incorporate all those templates??? Please help
<!---CFincludes header, Css style sheet and Side Menu--->
<cfinclude template="/Header.cfm">
ADD NEW DOCUMENT CODE
<SCRIPT LANGUAGE="JavaScript"><!--
function submitforms(){
Upload.submit()
Attachment.submit()
}
//--></SCRIPT>
<body>
<cfform action="Upload.cfm" method="POST" enablecab="No" name="Upload" enctype="multipart/form-data" preservedata="Yes">
<table border="0">
<tr>
<th colspan="2">Add a New Department Document</th>
</tr>
<tr>
<td>Document Name</td>
<td>
<cfinput type="text" name="wpTitle">
</td>
</tr>
<tr>
<td>Department</td>
<td>
<input type="hidden" name="wpdept">
<cfoutput>#Session.Auth.Dept#</cfoutput></td>
</tr>
<tr>
<td></td>
<td>
<input type="hidden" name="wptype" value="7">
</td>
</tr>
<tr>
<td>Description</td>
<td>
<cfinput type="text" name="wpDescription">
</td>
</tr>
<tr>
<td></td>
<td><input type="hidden" name="wpDateCreated" value="#CreateODBCDateTime(Now())#"</td>
</tr>
<tr>
<td colspan="2">
<tr>
<td colspan="2"></cfform>
<cfform action="Upload.cfm" method="POST" enablecab="No" name="Attachment" enctype="multipart/form-data" preservedata="Yes">
<input type="file" name="wpattachment" size="40" accept="application/msword,application/msexcel,application/pdf,text/html,application/rtf" class="button2">
<tr>
<td colspan="2"></td>
</cfform>
<tr>
<td colspan="2"></tr>
<tr>
<td colspan="2">
<input type="submit" value="Submit Forms" onClick="submitforms()">
</td>
</tr>
</table>
</body>
<!---CFInclude Footer--->
<cfinclude template="/footer.cfm">
How do I code Upload, besides I also have to specify that if extension is doc then show MSword.gif
<!---CFincludes header, Css style sheet and Side Menu--->
<cfinclude template="/Header.cfm">
ADD NEW DOCUMENT CODE
<SCRIPT LANGUAGE="JavaScript"><!--
function submitforms(){
Upload.submit()
Attachment.submit()
}
//--></SCRIPT>
<body>
<cfform action="Upload.cfm" method="POST" enablecab="No" name="Upload" enctype="multipart/form-data" preservedata="Yes">
<table border="0">
<tr>
<th colspan="2">Add a New Department Document</th>
</tr>
<tr>
<td>Document Name</td>
<td>
<cfinput type="text" name="wpTitle">
</td>
</tr>
<tr>
<td>Department</td>
<td>
<input type="hidden" name="wpdept">
<cfoutput>#Session.Auth.Dept#</cfoutput></td>
</tr>
<tr>
<td></td>
<td>
<input type="hidden" name="wptype" value="7">
</td>
</tr>
<tr>
<td>Description</td>
<td>
<cfinput type="text" name="wpDescription">
</td>
</tr>
<tr>
<td></td>
<td><input type="hidden" name="wpDateCreated" value="#CreateODBCDateTime(Now())#"</td>
</tr>
<tr>
<td colspan="2">
<tr>
<td colspan="2"></cfform>
<cfform action="Upload.cfm" method="POST" enablecab="No" name="Attachment" enctype="multipart/form-data" preservedata="Yes">
<input type="file" name="wpattachment" size="40" accept="application/msword,application/msexcel,application/pdf,text/html,application/rtf" class="button2">
<tr>
<td colspan="2"></td>
</cfform>
<tr>
<td colspan="2"></tr>
<tr>
<td colspan="2">
<input type="submit" value="Submit Forms" onClick="submitforms()">
</td>
</tr>
</table>
</body>
<!---CFInclude Footer--->
<cfinclude template="/footer.cfm">
How do I code Upload, besides I also have to specify that if extension is doc then show MSword.gif