Am 27.12.2015 um 16:35 schrieb Mike Kalist:
> Hi All  I know this is probably not the right place for this  but
> after hours  of google   thought i wold throw this out there.
> 
> I want to make a local website to send commands to pi all on local
> server
> 
> push button   on click  send a server side command
> /opt/owfs/bin/owserver -a alias.txt -u -p 3000
> 
> 
> I have a scripts bash and perl   and tried to run them on click with
> no success
> 
First, there is no way to achieve such a think without running a web server.
file:/ URLs don't work, as they never start an action outside the browser.


Non-Javascript solution:

<form action="action1.pl" method="post"><input type="submit" name="ACTION 
1"></form>
<form action="action2.pl" method="post"><input type="submit" name="ACTION 
2"></form>
<form action="action3.pl" method="post"><input type="submit" name="ACTION 
2"></form>

You need action1.pl etc. be CGI scripts inside your web server directory.
Or you use mod_perl instead of CGI and code the neccessary actions right
into your web page template.


If you want to have it fancy, you'd like to have some javascript
preprocessing in the browser and then trigger a server-side event
when a button is present. There are plenty of frameworks to do
that or you can do it with plain javascript. But that's all out of
our focus her.

Kind regards

        Jan



------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to