Run a command on a computer from a button on a web page using a Bookmark URL

  • administrators

    This page demonstrates the code in action:

    This is the code for your HTML page:

    <!DOCTYPE html>
    <h3>A demonstration of how to put a TRIGGERcmd bookmark button on a web page</h3>
    <p>Click to run Calculator on Russ's computer:</p>
    <button type="button" id="myBtn" onclick="myFunction()">Try it</button>
    <p id="demo"></p>
    function myFunction() {
    	const request = async () => {
       	const response = await fetch(
              // You can replace this Bookmark URL with your own:
              , { method: 'POST'}
            const body = await response.json();    

    To get a Bookmark URL for your own command, just click the red Bookmark button next to your command, and copy the URL from your browser's address bar.

Log in to reply

Looks like your connection to TRIGGERcmd Forum was lost, please wait while we try to reconnect.