php/js upload without submit
- Started
- Last post
- 7 Responses
- qaddisin
i trying to figure out how to upload a file once the file has been selected from the browse button and the uses clicks ok. i doing this so i can upload multiple files without and before submiting the form. any ideas of should i try something else. peace.
- BZZZP0
have you tried
onchange="document.forms.formNam...
as an attribute to the file input?
- ldww0
kind of on subject... can you upload an entire folder of images instead of just 1 by 1?
i am thinking about making a photo album.
- BZZZP0
it would (almost necessarily) be a function of the actual browser, so i would say no - in order for you to be able to even -try- to do that, you would have to open a whole lot of "security holes" browser makers (basically, ms) have been trying to close for years.
then again, maybe an applet run in a big enough sandbox could do it...
- ldww0
would the sandbox require me to bring a tonka truck?
(what is a sandbox)
- BZZZP0
yes. it would.
a sandbox is a limited space (in terms of resources, access, permissions, etc etc etc) that an application can be run in if there is potential the code is malignant.
- qaddisin0
the onchange event didnt work. but i trying something tricky since i hate the browse button i setup a hidden file field and created a input and submit button in my main form.
so what i am going to try to do is setup two forms one that uploads and refreshes the page [dynamic page] and then the main form that submits other data.
thanks for the help though. your cool. :)
- enobrev0
you should be able to set th earget of the form to a popup, and use that popup as an 'uploading' message, which would allow you to keep your current page as is. There isn't much of a way to send somehting to the server without 'loading' a page and sending the form data somehow.