Hey guys, I am new to HTML coding and have been practicing making a dot race, like the ones you see on scoreboards and stuff. I am struggling with it and would really appreciate it if someone could help me with what I already have coded.
Code:
<html>
<!--Description: Implementation of the "Dot Races" popular at sporting events.
This implementation has two dots that race down a track that has a length defined by the user.
-->
<head>
<title>Online Dot Race</title>
<script type = "text/javascript" src="DotFunctions.js">
</script>
<script type="text/javascript">
// ---------------
function TakeStep(p_RaceLength, p_Location)
// ---------------
// This function is designed to calculate a new location for one "generic" dot.
// Assumptions: p_RaceLength and p_Location are numbers
// Results: returns a new location that is 1, 2, or 3 steps more
{
}
// ---------------
function DisplayTrackArea(p_RaceLength, p_Red, p_Blue)
// ---------------
// Assumptions: all parameters are valid numbers
// Results: all locations are displayed and the track is updated
{
document.getElementById("t_RedTrack").value = CreateTrack(p_RaceLength, p_Red);
document.getElementById("s_RedDot").innerHTML = p_Red;
document.getElementById("t_BlueTrack").value = CreateTrack(p_RaceLength, p_Blue);
document.getElementById("s_BlueDot").innerHTML = p_Blue;
if
// need code here...
}
// ---------------
function DisplayResults(p_RedWins, p_BlueWins, p_Ties, p_Races)
// ---------------
// Assumptions: all parameters are valid numbers
// Results: all statistics are displayed in their text boxes
{
document.getElementById("s_Races").innerHTML = p_Races;
I can't help you, but if you posted this as needing help with javascript, you'd probably get better answers. You're having scripting issues, not html class issues.