Day 11

My eye injury is really interfering with this challenge... This is my cheat code day to say thank you Joe from codingphase.com.
#CodingPhase #TheCodingWay #365CodingPhaseChallenge

**********
shapes.html

<!DOCTYPE html>

<html>

<head>
<link rel="stylesheet" type="text/css" href="shapes.css">
<title>Gramps' Simon</title>
</head>

<body>
<div id="shape-board">
<div id="shape00">
<button id="cancel" onclick="setActiveControl(0)">Cancel</button>
<button id="start" onclick="freebee()">Start</button>
<button id="stop">Stop</button>
<!-- <button id="btn-time"></button>
If used, this will ask the user if they want the game to be timed
<label id="lbl-time"></label> -->
<label id="score">Score: </label>
<label id="diff">Difficulty: </label>
</div>
<div class="shape0" id="shape0">
<button type="button" id="play" onclick="setActiveControl(1)">Play</button>
<button type="button" id="exit" onclick="window.location.href='http://games.smchosting.com/'">Exit</button>
<button type="button" id="colors">Colors</button>
<button type="button" id="math">Math</button>
<button type="button" id="addsub">Add / Subtract</button>
<button type="button" id="multdiv">Multiply / Divide</button>
<button type="button" id="easy">Easy</button>
<button type="button" id="medium">Medium</button>
<button type="button" id="hard">Hard</button>
<label id="or"> or </label>
<label id="decide">You prefer to play?</label>
<label id="score">Score: </label>
</div>
<div class="shapeoff" id="shape1"></div>
<div class="shapeoff" id="shape2"></div>
<div class="shapeoff" id="shape3"></div>
<div class="shapeoff" id="shape4"></div>
<div class="shapeoff" id="shape5"></div>
<div class="shapeoff" id="shape6"></div>
<div class="shapeoff" id="shape7"></div>
<div class="shapeoff" id="shape8"></div>
<div class="shapeoff" id="shape9"></div>
</div>

<script>
function setActiveControl(control)
{
if (control == 0)
{
document.getElementById('shape0').setAttribute("class", "shapeon");
document.getElementById('shape00').setAttribute("class", "shapeoff");
}
else
{
document.getElementById('shape0').setAttribute("class", "shapeoff");
document.getElementById('shape00').setAttribute("class", "shapeon");
}
}

function freebee()
{
alert("My eye hurts. This is my cheat day of coding, Oct 30 2018...Thank you Joe from codingphase.com");
}

// if document.getElementById('play') && document.getElementByClassName('shapeoff')
// {
// change the shape of the Exit button... Figure out how...
<!-- } -->

</script>
</body>
</html>

Comments

Popular posts from this blog

Day 1

Day 365 + 1

Day 365 + 2