Forum Moderators: coopster

Message Too Old, No Replies

looking for a file picker for input field on a form

         

baze22

3:48 am on Sep 5, 2006 (gmt 0)

10+ Year Member



I posted something about this originally in the javascript forum, but I think it would have been better suited here. Guessing php for the file/directory browsing and js to pass the value to the form.

I have a form and on that form is an input field that needs a path & filename. I'm afraid the user will mistype when entering, and would like for them to beable to use a file picker to browse the directories and select the file, passing that value to the input field. I know something has to be out there to do this, but I can't find it. I'm finding plenty of stand alone file browsers, but nothing that will let me put a nice little picture of a folder next to the input box for the user to click on for a pop up file broswer.

thanks,

baze

jatar_k

4:25 pm on Sep 5, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you just want them to upload a file?

you could look at this
[php.net...]

baze22

5:04 pm on Sep 5, 2006 (gmt 0)

10+ Year Member



No, uploading is no problem. I want them to be able to browse files that already reside on the server, and then click on that filename, and have it (filename & path) returned to an input box on a form.

I've been working on it this morning and I'm thinking I could take just about any server side directory/file browser and make a simple modification to do it. My problem is that I'm assuming I'd need javascript to pass the info back to the form in the parent window and I haven't done much with javascript, so I'm looking for that answer to see if it will work.

thanks,

baze

jatar_k

5:09 pm on Sep 5, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



ah, picking on the server, didn't get that

for it to work in php you would need to resubmit the page on every click, not hard to do

using dir and outputting filenames found, making dir names clickable so they expand. The little icons would be easy too.

otherwise I would think something like AJAX would be the way to go