Programming C# C++ (7) Delphi (52) Java (108) JavaScript (31) Document (8) Events (24) ExtJS (57) Strings (117) perl (441) php (884) VBScript (131) Visual Basic (3539) ![]() |
How can I start two simultaneous downloads with one link?
![]() ![]() Question: I need to ensure that a user downloads two files and want to start both downloads once the user has clicked on 'Download now'. I cannot pack both files in one archive. How can I achieve this?Answer: This is a good application for IFRAMEs. (Or regular FRAMEs). Have one (I)FRAME for each document and write a function that sets each frame's location to one of the downloads.If you want to go fancy, you can even create those IFRAMEs dynamically on the fly with insertAdjacentHTML and setting their SRC parameter to each file's URL. Otherwise simply provide the two IFRAMEs somewhere small and not noticable at the bottom of the page and dynamically set their SRC attribute. Content-type: text/html
Comments:
|