-4

I want to make a HTML page with two components on it: Button and Edit. If I press on button then OpenDialogFile executes. After choosing a file, I want to see it's full path (f.e. "C:/temp_folder/superText.txt") inside my Edit.

<body>
<h1>FileCreator Page!</h1>

<form action="createCSV" method="get">
    <input type="text" name="fileName" value="D:/">
    <input type="file" value="Choose CSV" title="Choose"> <!-- title is not working-->
    <input type="submit" value="Load file into DB">
</form>
<body>
halfer
  • 19,824
  • 17
  • 99
  • 186
nightin_gale
  • 781
  • 3
  • 11
  • 26
  • Show us what you have tried so far. SO is for help with problems, we won't do your work for you. – Lowkase Jan 22 '14 at 13:37
  • my value and title do not work – nightin_gale Jan 22 '14 at 13:43
  • You cannot fetch the full path from a file input. – Alex K. Jan 22 '14 at 13:46
  • ok. So what is your proposal? Ho can I get my goal? I am java programmer, but know nothing about building GUI-interface using HTML = ( – nightin_gale Jan 22 '14 at 13:48
  • 1
    possible duplicate of [How to get the full path of the file from a file input](http://stackoverflow.com/questions/4176377/how-to-get-the-full-path-of-the-file-from-a-file-input) – Quentin Jan 22 '14 at 13:48
  • @nightin_gale — You cannot achieve your stated goal, but as I can't see an app that tells the user where they just picked a file from and being a very useful one, your stated goal probably isn't your real goal. – Quentin Jan 22 '14 at 13:56

1 Answers1

2

Due to security reasons you can not set a value for an input type file tag. Look at this thread for further information to this topic: set value for input type file

Also there is no attribute called "title", the text shown on the button is predifined by the browser and can not be changed.

Community
  • 1
  • 1
AHaberl
  • 328
  • 2
  • 12
  • ok, thx! I didn't know HTML can't do it. I supposed you gave me another ways. Now I am reading about JSF. I jope it will be the solution of my trouble) – nightin_gale Jan 22 '14 at 13:59