Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Is there a javascript ' on_click download .zip' ?

Makedo
Guest
Quote
2019-02-01 15:36:47

Hi everybody,

Is there a javascript 'on_click download file' .zip or png ?


Thanks


Makedo
Guest
Quote
2019-02-01 20:22:43

I tried this

Var a = document.createElement('a');
a.href="https://websiteaddress/filewithstuffinit/thefile.zip";
a.download='thefile.zip';

a.click();



The message on the html page is
Coukd not link program:Internal linking error

Although left click the object and a request from IE save file that can't be downloaded...


xanimalkingx
Registered User
Quote
2019-02-10 19:42:50

Note that this is ONLY for the HTML5 export of Coppercube. This wont work on Windows/Mac targets.
Not sure how to do this, though.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact