Page 1 of 1

Script for download file

Posted: 20 Jul 2022, 21:25
by RobCol
Hello,
what script can I use to open a download file from an IFS path?
I would like to use it at the click of a button.
thank you very much

Re: Script for download file

Posted: 21 Jul 2022, 23:47
by Dino
Hi RobCol,

Once you bring the button to the screen, you can add for example this code in the onClick:

Code: Select all

var hiddenElement = document.createElement('a');
hiddenElement.href = '/ts/skins/images/examplephoto.gif';
hiddenElement.target = '_blank';
hiddenElement.download = 'examplephoto.gif';
hiddenElement.click();
to download in this case a sample gif ur other file in the IFS:
axesdown.png
axesdown.png (105.26 KiB) Viewed 4788 times