My router is stupid, and needs to be rebooted a lot.
I've simplified the process down to
http:192.168.1.1/restart.htm as a shortcut on my desktop.
Once open, there is a JS button with the onClick command RebootDevice()
If I first load the restart page, then type RebootDevice(), it reboots.

Can I add something to the URL that automatically sends the JS command RebootDevice()

browse the source of the router page containing the reboot button
the source of javascript function will contain the actual url used to reboot the router
something like ' "/sys/restart2.xgi?submit REBOOT"; ' (dlink)
giving a value for your desktop button

<!-- one of many possible values -->
http://192.168.1.1/sys/restart2.xgi?submit REBOOT

forgot
tooo late to edit last post

in the javascript that performs the reboot
the url is broken into harder to recognize pieces
something similar to

var str = "/sys/restart2.xgi?";
str += exeStr("submit REBOOT");
location.href=str;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.