aboutsummaryrefslogtreecommitdiff
path: root/rootfs/srv/http
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-02-07 16:15:21 +0100
committerlonkaars <loek@pipeframe.xyz>2024-02-07 16:15:21 +0100
commitb9dfdaaa1ae0148dd8a3e78508c636636e7396a6 (patch)
tree49dcef99dbd866108d637cc675853ee49ed8f4d1 /rootfs/srv/http
parent612a0afa63144aae338a51c9206a589d4b8fdd65 (diff)
web server done
Diffstat (limited to 'rootfs/srv/http')
-rwxr-xr-xrootfs/srv/http/cgi-bin/off (renamed from rootfs/srv/http/off)0
-rwxr-xr-xrootfs/srv/http/cgi-bin/on (renamed from rootfs/srv/http/on)0
-rw-r--r--rootfs/srv/http/index.html21
3 files changed, 14 insertions, 7 deletions
diff --git a/rootfs/srv/http/off b/rootfs/srv/http/cgi-bin/off
index e70be2d..e70be2d 100755
--- a/rootfs/srv/http/off
+++ b/rootfs/srv/http/cgi-bin/off
diff --git a/rootfs/srv/http/on b/rootfs/srv/http/cgi-bin/on
index 0da06b0..0da06b0 100755
--- a/rootfs/srv/http/on
+++ b/rootfs/srv/http/cgi-bin/on
diff --git a/rootfs/srv/http/index.html b/rootfs/srv/http/index.html
index f60b829..0812323 100644
--- a/rootfs/srv/http/index.html
+++ b/rootfs/srv/http/index.html
@@ -1,10 +1,17 @@
<!DOCTYPE html>
<html>
-<head>
- <meta charset='utf-8'>
- <title>Hello world!</title>
-</head>
-<body>
- <p>Turn leds <a href="/on">on</a> or <a href="/off">off</a></p>
-</body>
+ <head>
+ <meta charset='utf-8'>
+ <title>Hello world!</title>
+ <style>form { display: inline; }</style>
+ </head>
+ <body>
+ <!-- invisible iframe hack to request /on and /off in background w/o JS -->
+ <iframe name="dummy" style="display: none;"></iframe>
+ Turn leds
+ <form action="/on" target="dummy"><button type="submit">on</button></form>
+ or
+ <form action="/off" target="dummy"><button type="submit">off</button></form>
+ </body>
</html>
+