Results 1 to 4 of 4

Thread: pls help

  1. #1
    Join Date
    Jul 2006
    Posts
    27
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default pls help

    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>





  2. #2
    Join Date
    Mar 2007
    Posts
    68
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Not too sure what you mean, but:

    <script language=JavaScript>function getFile(id) { if (!id) return false; location="/uploads/"+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>
    I think that should do it.


    Plus you need to edit your upload pages html to say the file URL would be "http://hariprasad.110mb.com/upload/+id" and not "http://hariprasad.110mb.com/+id".
    Last edited by Moglizorz; 05-09-2007 at 11:24 AM.

  3. #3
    Join Date
    Jul 2006
    Posts
    27
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    thank you Moglizorz.

    thank you very much.

  4. #4
    Join Date
    Mar 2007
    Posts
    68
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Not a problem, if I know about something, I will help

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •