+ 1
Linking buttons to external scripts in html
can you link an html button to an external script. for instance executing a disable wifi adapter script in terminal on a linux OS(script premade and ready to execute once called on) and if so, can it only be a click button or can i make a toggle button(ie on and off where on executes enable adapter and off executes a seperate, maybe a javascript with an if then statement?)
3 ответов
+ 1
javascript cant access the file system in the host for security reasons. Some browsers support vbscript and that would work but not on linux.
+ 1
i did some googling. https://github.com/nwjs/nw.js/blob/nw34/README def check this i think it might work for you.
0
ok what about other languages? my goal is to build an html interface page similar to POS systems. then included in that same folder add scripting documents that can be executed within terminal to perform very specific functions like enable and disable wifi adapter or BT. as long as the scripting docs are located in the source folder can that be done? if so would i need to include an 'execute in root/sudo' styled doc as well to run first each time? and just use java or other source code to handle the logical execution order and user input? im also considering using the button to launch a java based user input(similar to the 'select which boot options) to execute specific series of command like disable wifi