0

Is it possible, in a form, to cross the input text field and the browser button, whatever the browser !

<input id="fileuploadID" type="file" name="fileuploadID" />  

This gives a text field following by the select file button.

Bertaud
  • 2,888
  • 5
  • 35
  • 48

1 Answers1

1

Nope.

It does't make sense either, as the web site is not supposed to get the path of the selected file, and the user isn't supposed to be able to change it freely.

There are various approaches to re-styling the input element using CSS, but none will give a file upload text field functionality.

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • that make sense in a form in order to respect the logic "label -> input field -> [button] – Bertaud Jul 05 '13 at 17:09
  • @Bertaud ah, I see. Hmm, you can look around in resources like this: http://www.quirksmode.org/dom/inputfile.html whether anything works for you – Pekka Jul 05 '13 at 17:16
  • Also the second answer here: [Styling issues with a file input field in Firefox](http://stackoverflow.com/q/352467) – Pekka Jul 05 '13 at 17:17