Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Edit webpage Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
docwisdom
Newbie
Newbie
Avatar

Joined: May 07 2003
Location: United States
Online Status: Offline
Posts: 1
Posted: May 07 2003 at 11:16 | IP Logged Quote docwisdom

I am using powerhome in an online interactive art project and i wanted to edit the webpages so they only had the status and on/off buttons, can someone explain how to do this. I tried editing the index.psp in the samples folder and nothing happened. Where do these files reside?

 

brian

Back to Top View docwisdom's Profile Search for other posts by docwisdom
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 07 2003 at 19:40 | IP Logged Quote TonyNo

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>&nbsp;Status:

<% case(ph_getx10stat("A",10) when 0 then "Unknown" when 1 then "Off" when 2 then "On") %>&nbsp;

<input type="button" value="On" onclick="sk('ph_rtne( ph_x10( 1, \'A\', 10, 0) + ph_x10( 1, \'A\', 102, 0))')">
&nbsp;
<input type="button" value="Off" onclick="sk('ph_rtne( ph_x10(1, \'A\', 10, 0) + ph_x10( 1, \'A\', 103, 0))')">

</body>
</html>

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 07 2003 at 19:44 | IP Logged Quote dhoward

Brian,

If you edit the index.psp in the pspsamples directory then you should be good to go.  You'll just need to access the page in the pspsamples directory.  If you normally bring up the main page by typing http://127.0.0.1 in your browser, then you would have to type http://127.0.0.1/pspsamples/index.psp .  This will bring up your edited copy.  You could also copy the edited index.psp file to the web directory and you'll be able to access it via the first url.

Let me know if you have any other problems.

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum