Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOLVED - Add multiple files
#1
If you want to add several documents to the folder, what will you do?
1. Click "Add multiple files (will use filename as document name)"
2. Add one file, add second. And then you decide to add third file.
3. Upppps... All information cleared.
It will be convinient to give opportunity to add next file without clearing previous added.

p.s. and "use filename as document name" better to use as option because sometimes it is not interesting to write Name of file.
"Whatever you do, work at it with all your heart, as working for the Lord, not for human masters". Kol.3:23
Reply
#2
(06-14-2011, 08:47 PM)kotikov_a Wrote: If you want to add several documents to the folder, what will you do?
1. Click "Add multiple files (will use filename as document name)"
2. Add one file, add second. And then you decide to add third file.
3. Upppps... All information cleared.
It will be convinient to give opportunity to add next file without clearing previous added.

p.s. and "use filename as document name" better to use as option because sometimes it is not interesting to write Name of file.

I find good variant to solve this problem: using <ol> and createElement, because innerHtml lose value after adding new line. In <b>out.AddDocument</b>
Quote:function addFiles()
{
var li = document.createElement('li');
li.innerHTML = '<input type="File" name="userfile[]" size="60">';
document.getElementById('files').appendChild(li);
// document.getElementById("files").innerHTML += '<br><input type="File" name="userfile[]" size="60">';
}
Quote:<tr>
<td><?php printMLText("local_file");?>:</td>
<td>
<a href="javascript:addFiles()"><?php printMLtext("add_multiple_files") ?></a>
<ol id="files">
<li><input type="File" name="userfile[]" size="60">
</ol>
</td>
</tr>
[ATTACHMENT NOT FOUND]
"Whatever you do, work at it with all your heart, as working for the Lord, not for human masters". Kol.3:23
Reply
#3
Thanks for the patch. It will be part of the next version.

Uwe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)