What's new

Script Access

JB_1366

Occasional Visitor
Question: how do i execute a script i created in /jffs/scripts from a clickable-button on my webpage? right now I use cron to execute. i dont know what format i need, to execute on Merlin firmware. webpage is sitting in /www/user5.asp like its supposed to. AI couldnt figure out how to integrate to web interface either, so for now its a bookmarked page for me.
 
The user5.asp page needs a button that submits the form with the document.form.action_script="restart_myscript".

Then you would modify /jffs/scripts/service-event to react when the $2 parameter equals "myscript" or whatever you want to call your trigger. If the $2 parameter matches, you would invoke your real script in /jffs/scripts from the service-event script.

Easy peasy. 😁
 
The user5.asp page needs a button that submits the form with the document.form.action_script="restart_myscript".

Then you would modify /jffs/scripts/service-event to react when the $2 parameter equals "myscript" or whatever you want to call your trigger. If the $2 parameter matches, you would invoke your real script in /jffs/scripts from the service-event script.

Easy peasy. 😁
I don't suppose you could give me the exact code to use for webpage button & service-event entry?
 
I don't suppose you could give me the exact code to use for webpage button & service-event entry?
There's an example in the API link in my previous post. Only you know what you're trying to accomplish. Specifics matter.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Back
Top