Download file and JavaScript calling
Hello everyone,
Recently, I responded to a request from someone who wanted to be able to download a file without encountering a blank window. This required the use of JavaScript, and the person did not want to install Ninext for this. Therefore, I proposed an alternative solution that allows calling JavaScript using a dialogue window. The system is simple: it is possible to insert HTML into a dialogue window, which therefore allows the addition of JavaScript as well. You just need to add the necessary code for downloading a file to enable the download, and a small piece of code that closes the window after the code has been executed. This is what the global functions downloadURL() and execJS() do in the attached application.
It would also have been possible to add the code in an HTML form that mimics a Ninox button, but I find this solution more cumbersome compared to a global function that can be called from any code (provided, of course, that it is executed locally).
Enjoy
2 replies
-
This is EXACTLY what I was looking for. Thank you!
-
Hi Jacques. I use a label printing program called BarTender used extensively in production environments ( will know about this). I am using your program to store the many hundreds of different files we have so that we can easily find and download the correct one. They all have a btw extension. Is there a way to adapt your button to be able to download the file and then run it? Not a problem , if not.
We used to have all these files in a complex file and folder structure that no-one fully understood. This simple one-table app is saving us hours a week!
Many thanks
John
Content aside
-
4
Likes
- 8 hrs agoLast active
- 2Replies
- 297Views
-
3
Following