Posted: May 07 2003 at 19:40 | IP Logged
|
|
|
Here is a bit of html that will do what you want. It is setup for controlling A10. The code could be more simple (no Java), but, this is what I have laying around. Cut and paste it into Notepad and save it as "simple.psp" in the PowerHome\web folder.
<html>
<head> <script language="JavaScript"> <!--
function sk(value) { document.execsendkeys.sendkeys.value = value; document.execsendkeys.submit(); }
// --> </script> </head>
<body>
<form method="post" name="execsendkeys" action="/ph-cgi/execsendkeys"> <input type="hidden" name="sendkeys" value=""> <input type="hidden" name="nexturl" value="/simple.psp"> </form>
<b>Device Control & Status</b> <p> <b>A10</b> Status:
<% case(ph_getx10stat("A",10) when 0 then "Unknown" when 1 then "Off" when 2 then "On") %>
<input type="button" value="On" onclick="sk('ph_rtne( ph_x10( 1, \'A\', 10, 0) + ph_x10( 1, \'A\', 102, 0))')"> <input type="button" value="Off" onclick="sk('ph_rtne( ph_x10(1, \'A\', 10, 0) + ph_x10( 1, \'A\', 103, 0))')">
</body> </html>
|