Connecting Tech Pros Worldwide Help | Site Map

Can I get status button html code (red color for OFF, Green for ON)

Member
 
Join Date: Oct 2009
Posts: 94
#1: 4 Weeks Ago
I am looking for status button html code, should be in a rectangle box, one is ON and other one is OFF, red color for OFF and Green for ON.

status depends on a variable called "stat_var", if it is 1 means ON (Green) and if it is zero means OFF(Red)

thanks.
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#2: 4 Weeks Ago

re: Can I get status button html code (red color for OFF, Green for ON)


if you provide the status by a server script, the buttons are just a matter of CSS.
Member
 
Join Date: Oct 2009
Posts: 94
#3: 4 Weeks Ago

re: Can I get status button html code (red color for OFF, Green for ON)


I searched on net, I found one button with RED color for OFF and the other witg Green for ON below.

<input type="button" value=
"ON" style="background-color: #00cc00; color: #ffffff;" />

<input type="button" value="OFF" style="background-color: #cc0000; color
: #ffffff;" />
Reply