Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: change linkcolour according to status Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: June 03 2008 at 14:21 | IP Logged Quote krommetje

Hey all (perhaps an easy question but....)

Been reading a lot, but no posting, but here I am again:

My daughter has a bedside lamp which has a running time of 20min. She is allowed to read for 20min. and then PH shuts the light off. I do this with a hyperlink to start a macro like this: (on my touchscreen in the livingroom)

Code:

<a href=http://192.168.1.17/maiketijd.psp>Maikelight On>


can I change the textcolour according to the status of the light? (address is L3)

Peter

Edited by krommetje - June 03 2008 at 14:22
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: June 03 2008 at 17:30 | IP Logged Quote TonyNo

Sure. Just put two FONT COLOR statements in an IF that checks the light status. I can post actual code in a few hours.

This would give blue text...

<A HREF=http://192.168.1.17/maiketijd.psp>
<FONT COLOR="#0000FF">Maikelight On></FONT>
</A>
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: June 03 2008 at 20:28 | IP Logged Quote TonyNo

OK, here's some code...

The link is dark yellow when on and grey when off.

Code:
<A HREF=/maiketijd.psp>
<FONT COLOR="<% if( [X10STATL3] = 2, '#7f7f00', '#808080') %>">Maikelight On></FONT>
</A>

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: June 04 2008 at 08:40 | IP Logged Quote krommetje

Hey TonyNo,

now I know what went wrong:

this part of the code: %>">Maikelight On> I forgot the "

oops, elementary mistake

thanks...
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje'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