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>












share|improve this question




















  • 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















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>












share|improve this question




















  • 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













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>












share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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














  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







Popular posts from this blog

Bressuire

Vorschmack

Quarantine