hariprasad
05-09-2007, 10:57 AM
i got an html code for download box in which when we enter the code ( or file name ) we can download that file.
i creatd a folder called 'upload' ( hariprasad.110mb.com/upload )in which all files are uploaded which also include the html file ( index.html )in which the download box is placed. after opening the index.html file i entered the name in the field and clicked the button , it searched the files in main directory ( hariprasad.110mb.com/ ) not the folder ' upload '. pls help me to correct the mistake in the html code.
html code of the download box is :
<script language=JavaScript>function getFile(id) { if (!id) return false; location="/"+id; return false; }</script>
<br><table border=0 width=100% cellpadding=0><tr><td background=skin/dotsHor.gif><img border=0 src="skin/dotsHor.gif" width=3 height=1></td></tr></table><table border=0 width=100%><tr><td><table border=0 width=100%><tr><td><form name=getform onsubmit="return getFile(this.id.value);"><tr><td>Get File by ID:</td></tr><tr><td>File ID: <input type=text name=id size=5></td></tr><tr><td><input type=button value="Get it" onClick="getFile(this.form.id.value);"></td></tr></form></table></td><td align=center></td></tr></table></td>
</tr>
<tr><td background="/skin/dotsHor.gif" colspan=3><img border=0 src="/skin/dotsHor.gif" width=3 height=1></td></tr>
<tr><td align=left colspan=3 class=sm11>
http://img176.imageshack.us/img176/7317/getittw8.jpg
i creatd a folder called 'upload' ( hariprasad.110mb.com/upload )in which all files are uploaded which also include the html file ( index.html )in which the download box is placed. after opening the index.html file i entered the name in the field and clicked the button , it searched the files in main directory ( hariprasad.110mb.com/ ) not the folder ' upload '. pls help me to correct the mistake in the html code.
html code of the download box is :
<script language=JavaScript>function getFile(id) { if (!id) return false; location="/"+id; return false; }</script>
<br><table border=0 width=100% cellpadding=0><tr><td background=skin/dotsHor.gif><img border=0 src="skin/dotsHor.gif" width=3 height=1></td></tr></table><table border=0 width=100%><tr><td><table border=0 width=100%><tr><td><form name=getform onsubmit="return getFile(this.id.value);"><tr><td>Get File by ID:</td></tr><tr><td>File ID: <input type=text name=id size=5></td></tr><tr><td><input type=button value="Get it" onClick="getFile(this.form.id.value);"></td></tr></form></table></td><td align=center></td></tr></table></td>
</tr>
<tr><td background="/skin/dotsHor.gif" colspan=3><img border=0 src="/skin/dotsHor.gif" width=3 height=1></td></tr>
<tr><td align=left colspan=3 class=sm11>
http://img176.imageshack.us/img176/7317/getittw8.jpg