How to select multiple files for upload :
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
How to select multiple files for upload :
This depends on the browser. Newer versions of firefox and chrome support this because they started to implement HTML5 specification. This is the syntax:
<input type="file" multiple=""/>
Firefox >= 3.6, Chrome >= 2, Safari >= 4 support multiple file input.
For older browsers the only good solutions are flash or javascript plugins. Here is a good resource for jquery uploaders ( some support multiple files ): http://creativefan.com/10-ajax-jquery-file-uploaders/
In HTML5 you can set the multiple
attribute on <input type="file">
. This works in browsers supporting HTML5.
<input type="file" name="upload" multiple="multiple" />
In HTML4 your best bet is Flash or Java Applet. There are 3rd party libs available like Uploadify, SWFupload, JUpload and JumpLoader.
I would definately at this point go with new HTML5 "multiple" attribute:
<input type="file" name="upload[]" multiple="multiple" />
The only viable alternative is FLASH plugins like swfupload.
However - there are multiple prublems with using FLASH for uploads, the main one foor me would be cookie bug:
FLASH plugins don t send cookies correctly. Each browser has it s own cookie storage.FLASH always sends cookies from IE even if you use Google Chrome for example. - result is that you loose cookies and sessions. there is a workaround - but it requires you to send session ID as GET or POST parameters which in turn makes your site vulnerable for session fixation.
You could also use javascript plugins such as: http://code.google.com/p/noswfupload/
Use the file input form element more than once, give it a different name and you have multiple upload fields on one page. No need to learn anything else.
There is no html/javascript workaround. You would have to look to flash or java to be able to do this.
As others have said, you have to use Flash to get multiple uploads. An alternative to uploadify is SWFUpload.
Flash is the only option except HTML5.
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
I have a div <div id="masterdiv"> which has several child <div>s. Example: <div id="masterdiv"> <div id="childdiv1" /> <div id="childdiv2" /> <div id="...
I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...
<form><input type="file" name="first" onchange="jsFunction(2);"> <input type="file" name="second" onchange="jsFunction(3);"</form> Possible to pass just numbers to the js ...
So I ve got a menu with a hover/selected state and it loads fine in IE6/IE7. However when I scroll down the page and put the element outside of the viewport and then back in I get a broken image! I ...
I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...
Is it possible to reload a form after file-input change? I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it ...
I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!