Table using loop and dates html and javascript
up vote
-2
down vote
favorite
I am trying to create a table that i can look ahead to see the future schedule months ahead. It follows this pattern.
Monday to Sunday
Days [Team A][Team A][Team A][Team A][Team B][Team B][Team B]
Three teams that alternate each 4 days.
<script>
var days = ["A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team","C Team","C Team" ];
var nights ["C Team","C Team","A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team"];
var text = "";
var i;
for(i = 0; i < 6; i++)
text += days[i];
document.getElementById("team").innerHTML = text;
</script>
<div id="team"></div>
javascript html5
add a comment |
up vote
-2
down vote
favorite
I am trying to create a table that i can look ahead to see the future schedule months ahead. It follows this pattern.
Monday to Sunday
Days [Team A][Team A][Team A][Team A][Team B][Team B][Team B]
Three teams that alternate each 4 days.
<script>
var days = ["A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team","C Team","C Team" ];
var nights ["C Team","C Team","A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team"];
var text = "";
var i;
for(i = 0; i < 6; i++)
text += days[i];
document.getElementById("team").innerHTML = text;
</script>
<div id="team"></div>
javascript html5
2
What's the problem?
– Jack Bashford
Nov 10 at 22:48
Trying to design a schedule that i can look months ahead to see what day certain teams fall on which days.
– Sam Whisenhunt
Nov 10 at 23:02
2
@SamWhisenhunt You need to provide what you've tried specifically and what doesn't work... Your question is too broad...
– SakoBu
Nov 10 at 23:05
I edited my post with what i tried
– Sam Whisenhunt
Nov 11 at 21:31
add a comment |
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
I am trying to create a table that i can look ahead to see the future schedule months ahead. It follows this pattern.
Monday to Sunday
Days [Team A][Team A][Team A][Team A][Team B][Team B][Team B]
Three teams that alternate each 4 days.
<script>
var days = ["A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team","C Team","C Team" ];
var nights ["C Team","C Team","A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team"];
var text = "";
var i;
for(i = 0; i < 6; i++)
text += days[i];
document.getElementById("team").innerHTML = text;
</script>
<div id="team"></div>
javascript html5
I am trying to create a table that i can look ahead to see the future schedule months ahead. It follows this pattern.
Monday to Sunday
Days [Team A][Team A][Team A][Team A][Team B][Team B][Team B]
Three teams that alternate each 4 days.
<script>
var days = ["A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team","C Team","C Team" ];
var nights ["C Team","C Team","A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team"];
var text = "";
var i;
for(i = 0; i < 6; i++)
text += days[i];
document.getElementById("team").innerHTML = text;
</script>
<div id="team"></div>
<script>
var days = ["A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team","C Team","C Team" ];
var nights ["C Team","C Team","A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team"];
var text = "";
var i;
for(i = 0; i < 6; i++)
text += days[i];
document.getElementById("team").innerHTML = text;
</script>
<div id="team"></div>
<script>
var days = ["A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team","C Team","C Team" ];
var nights ["C Team","C Team","A Team", "A Team", "A Team", "A Team", "B Team", "B Team","B Team", "B Team", "C Team","C Team"];
var text = "";
var i;
for(i = 0; i < 6; i++)
text += days[i];
document.getElementById("team").innerHTML = text;
</script>
<div id="team"></div>
javascript html5
javascript html5
edited Nov 11 at 16:10
asked Nov 10 at 22:45
Sam Whisenhunt
62
62
2
What's the problem?
– Jack Bashford
Nov 10 at 22:48
Trying to design a schedule that i can look months ahead to see what day certain teams fall on which days.
– Sam Whisenhunt
Nov 10 at 23:02
2
@SamWhisenhunt You need to provide what you've tried specifically and what doesn't work... Your question is too broad...
– SakoBu
Nov 10 at 23:05
I edited my post with what i tried
– Sam Whisenhunt
Nov 11 at 21:31
add a comment |
2
What's the problem?
– Jack Bashford
Nov 10 at 22:48
Trying to design a schedule that i can look months ahead to see what day certain teams fall on which days.
– Sam Whisenhunt
Nov 10 at 23:02
2
@SamWhisenhunt You need to provide what you've tried specifically and what doesn't work... Your question is too broad...
– SakoBu
Nov 10 at 23:05
I edited my post with what i tried
– Sam Whisenhunt
Nov 11 at 21:31
2
2
What's the problem?
– Jack Bashford
Nov 10 at 22:48
What's the problem?
– Jack Bashford
Nov 10 at 22:48
Trying to design a schedule that i can look months ahead to see what day certain teams fall on which days.
– Sam Whisenhunt
Nov 10 at 23:02
Trying to design a schedule that i can look months ahead to see what day certain teams fall on which days.
– Sam Whisenhunt
Nov 10 at 23:02
2
2
@SamWhisenhunt You need to provide what you've tried specifically and what doesn't work... Your question is too broad...
– SakoBu
Nov 10 at 23:05
@SamWhisenhunt You need to provide what you've tried specifically and what doesn't work... Your question is too broad...
– SakoBu
Nov 10 at 23:05
I edited my post with what i tried
– Sam Whisenhunt
Nov 11 at 21:31
I edited my post with what i tried
– Sam Whisenhunt
Nov 11 at 21:31
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244165%2ftable-using-loop-and-dates-html-and-javascript%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
What's the problem?
– Jack Bashford
Nov 10 at 22:48
Trying to design a schedule that i can look months ahead to see what day certain teams fall on which days.
– Sam Whisenhunt
Nov 10 at 23:02
2
@SamWhisenhunt You need to provide what you've tried specifically and what doesn't work... Your question is too broad...
– SakoBu
Nov 10 at 23:05
I edited my post with what i tried
– Sam Whisenhunt
Nov 11 at 21:31