need a "download all" script

P

Pandu

Hello:

Our HR dept wants to allow users to download various HR forms from our
comp intranet. But since there are over 20 forms, I need to allow
users to select the files they want and then download the selected
files using a single click to "Download All" button. How can I do
this? Is there some canned script that would do this? Is this even
possible with a client side script?

Thanks.

- Pandu

PS. I am new to scripting :(
 
T

Thomas 'PointedEars' Lahn

Pandu said:
Our HR dept wants to allow users to download various HR forms from our
comp intranet. But since there are over 20 forms, I need to allow
users to select the files they want and then download the selected
files using a single click to "Download All" button. How can I do
this? Is there some canned script that would do this? Is this even
possible with a client side script?

You will need a server-side script, too.


PointedEars
 
E

Evertjan.

Thomas 'PointedEars' Lahn wrote on 11 okt 2007 in comp.lang.javascript:

What HR?

High Risk debt?

You will need a server-side script, too.

Or have them use FTP.
 
R

riog

Hi,

1. Use an iframe on your HTML:

<iframe id="iframeobj" src="" style="visibility:hidden"></
iframe>

2. Use this javascript function:

var DELAY=3;
function getFile(url)
{
iframeobj = document.getElementById('iframeobj');
iframeobj.src = url;

}
function getFiles(var fileList) {
for(i = 0; i < fileList.length; i++) {
setTimeout("getFile('" + fileList + "')", DELAY*1000);
}
}

3. Now get the list of files and pass it as an array to the getFiles
function.

onclick=getFiles(getSelectedFiles());

(You will have to implement the getSelectedFiles function yourself)
(You can do it ^_^).


Regards,
riog
 
C

Captain Paralytic

Hello:

Our HR dept wants to allow users to download various HR forms from our
comp intranet. But since there are over 20 forms, I need to allow
users to select the files they want and then download the selected
files using a single click to "Download All" button. How can I do
this? Is there some canned script that would do this? Is this even
possible with a client side script?

Thanks.

- Pandu

PS. I am new to scripting :(

Do you have server side scipting available (e.g. php), if so I would
do this server side.
 
E

Evertjan.

riog wrote on 11 okt 2007 in comp.lang.javascript:
1. Use an iframe on your HTML:

Whose HTML?

What are you talking about?

[please always quote on usenet]
 
G

Gregor Kofler

Pandu meinte:
Hello:

Our HR dept wants to allow users to download various HR forms from our
comp intranet. But since there are over 20 forms, I need to allow
users to select the files they want and then download the selected
files using a single click to "Download All" button. How can I do
this? Is there some canned script that would do this? Is this even
possible with a client side script?

Thanks.

- Pandu

PS. I am new to scripting :(

This would be more of a server-side issue. Anyway, keep it simple:
provide all the forms in an (additional) zip-file.

Gregor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,150
Messages
2,570,853
Members
47,394
Latest member
Olekdev

Latest Threads

Top