HTML INPUT FILE initial directory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • revanth8143
    New Member
    • Jun 2007
    • 2

    #1

    HTML INPUT FILE initial directory

    Hi All !
    I am trying a lot to set the initial directory of htmlinputfile control.......b ut not getting....plea se let me know the solution if any one knows.......... bit urgent

    revanth
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    revanth, welcome to TSDN!

    I'm not sure what HTMLINPUTFILE is. Could you post some code? It may be that this is not a javascript problem.

    Comment

    • revanth8143
      New Member
      • Jun 2007
      • 2

      #3
      Originally posted by acoder
      revanth, welcome to TSDN!

      I'm not sure what HTMLINPUTFILE is. Could you post some code? It may be that this is not a javascript problem.
      Thanks for ur response.

      <input " type="file" name="myFile">

      this is an html control.its embedded with a textbox and a "Browse" button.
      When i click the browse button,i could open from "Desktop".B ut,i want it to be open from a specific directory(like "c" or "d" drives).please let me know the solution.

      Comment

      • mrhoo
        Contributor
        • Jun 2006
        • 428

        #4
        <input " type="file" name="myFile">

        input type="file" is read only in javascript, to prevent scripts from reading (and possibly posting) data from your hard drive...

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Originally posted by revanth8143
          <input " type="file" name="myFile">

          this is an html control.its embedded with a textbox and a "Browse" button.
          Oh, right. You put all that together without spaces, so I thought is was some .NET control object or something. I've changed the thread title.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Originally posted by mrhoo
            <input " type="file" name="myFile">

            input type="file" is read only in javascript, to prevent scripts from reading (and possibly posting) data from your hard drive...
            This link discusses this in more detail.

            Comment

            Working...