Here is my fiddle for visual understanding, it is kind of messy but it works on my side. When you click on the box it will toggle a DIV with a circle inside. I want that circle to flicker like a light. Other boxes will show up with different colors from green, yellow and red. The color corresponds to their status such as logged in, online and offline. The way I am producing these circles is with PHP by looking at their status. I am using a variable called $circle of type canvas because I don't know how else to do it. Below is my code, I am showing only the part of the "circle".
In case animations can't work, I am using Internet Explorer 9.08.
thanks in advance!
PHP:
$class = ""; //class variable to empty string, the IF statements are below it
$state = ""; //state variable to empty string
//ONLINE
//if ping succeeds but no user is found
if( ($user == null) && ($online == 1) ){
$user = "No User";
$class = "online";
$state = "Online";
}
//LOGGED IN
//ping succeeds and a user is found
elseif( ($user != null) && ($online == 1) ){
//user will be the value from $row['username']
$class = "loggedin";
$state = "Logged In";
}
//OFFLINE
//if No ping make user and class name show offline
else{
$user = "No User";
$class = "offline";
$state = "Offline";
}
//display DIV with the content inside
echo '<div class="station_info_ ' . $class . '" id="station_info_' . $id . ' circle" rel="' . $class . '" style="left:' . $x_pos . 'px;top:' . $y_pos . 'px;"><p>User:' . $user .'<br>Station:' . $hostname . '<br>Pod:' . $sta_num . '<br>Section:' . $sec_name . '<br>State:' . $state .'<br></p></div>' . "\n";