ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:    
Ambiera Forum > CopperCube > Programming and Scripting
Is there a javascript ' on_click download .zip' ?
Author Text

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: "Internati?nal" (you are not logged in)


Text:

 

  

Forum 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


   





Software: Ambiera Light Forum. © 2008-2018 Nikolaus Gebhardt, Ambiera e.U.