I made a site for a client which requires the user to click an image and then a input type file field shows up with the usual browse button and submit button. The user then finds a file on their hard drive and clicks upload.
But my client doesn't like this, she wants the image itself to function like the browse button, so when the user clicks the image it will automatically prompt them to choose a file from their hard drive.
My first instinct is to do it this way:
I will still have the input type file form field but hide it using css display none property. When the user clicks the image I will use jQuery to automatically click the browse button as a result. I'm not sure if this will work as I haven't implemented it yet. But before I do can you think of a better/cleaner way of doing this?