Prev: Motivation of software professionals
Next: asp
From: Thomas 'PointedEars' Lahn on 6 Feb 2010 22:57 Jedrin wrote: > In answer to what environment I have, it is ruby on rails server > running on linux. You have a part client-side, part server-side problem, so the client-side environment matters, too. > I think it has the standard prototype javascript library > which has ajax support. Whatever you mean by this. > I've used jquery before as well. Definitely client-side now. And dump jQuery while you still can. > That plupload looks like multiple file upload where as I am looking > for multiple file download. As I said, IIUC, you do not need scripting to do this, if you serve a document with several iframes where each triggers a file download. With client-side scripting, though, you can append those `iframe' elements dynamically by which you could, therefore, trigger multiple downloads with only one click (however, the user will have to confirm each download separately by default). > My google search was something like 'javascript multiple file > download', but I did it at work so I can't be sure exactly and I am at > home currently. Your message headers indicate you do have Web access at home, too. > I found an example that did a window.open() inside of a setTimeout(). The obvious and workable solution are separate views because they can access a different resource each; whether you should be using iframes or popup windows depends mostly on the client-side target environments: popup windows are blocked in more recent browsers (by now regardless of setTimeout(), BTW), iframes are not; however, iframes are not as well supported in less recent browsers, while popup windows are. Popup windows also tend to leak memory; allocated memory is not (always) (immediately) (fully) freed when the window is closed. And there are general usability issues, too. > I've done a bit of javascript, but I'm not a wiz. I reasoned that if it > was easy to do that, you could create viruses that did that which I had > not seen too many like that .. The virus would be only "good" if it would also open/run the downloaded file without asking. While there are exploits to do this, they usually depend on security leaks in third-party software (like the Acrobat/Adobe Reader browser plugin; by coincidence, I have heard in an IT Security lecture yesterday of a real-world example how the Mebroot rootkit could install itself in the MBR by downloading and running an .exe file from a bogus PDF document viewed in there). PointedEars -- Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee
From: Jedrin on 8 Feb 2010 13:56 Thanks, I see that with IFrames this is easy to do, something that never occurred to me. There is no way to get around that the user has to confirm each and every download ?
From: Thomas 'PointedEars' Lahn on 8 Feb 2010 16:20
Jedrin wrote: > I see that with IFrames this is easy to do, something that never > occurred to me. There is no way to get around that the user has to > confirm each and every download ? Not by default, fortunately. PointedEars -- Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee |