View Single Post
  #5 (permalink)  
Old August 20th, 2004, 09:00 PM
bleitner bleitner is offline
Authorized User
 
Join Date: Nov 2003
Location: Phoenix, AZ, USA.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Imar
 Hi Bob,

Although you cannot set the value of the <input type="file"> control, you can read from it.

What you could do is write a little JavaScript function that retrieves the value from the file field, and stores it in a hidden field. You can call this function on onblur of the file field, or when the user clicks a submit button, for example.

Then, at the server, you can retrieve the name of the file from the hidden field. You may need to reset the file field to prevent the actual upload of the file.

You can only have a user select a real file, not a folder. So, unfortunately, when you want your users to select a folder, you'll have to make them point to a file inside that folder, and then at the server extract the folder name from the file name.

With normal HTML, you cannot retrieve a picture from a camera. Maybe if you write an ActiveX control, you could do it, but I haven't tried
anything like that before.

If you need help with the JavaScript solution, let me know.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Hi Imar,

I'd prefer to get the picture directly from a camera than using the file browse. I'd also rather use javascript that activex, so if you have a solution for this I would be very interested in it!

Thank you!
Bob

Reply With Quote