I had to do a break function and scripts in this portion. I am wondering if my format is correct
here is what i made
Let me know if this makes sense as I am still learning.Code:function createBar(partyType,percent){ // script element to create blank cells switch(partyType) { case "D": document.write("<td class='dem'></td>"); break; case "E": document.write("<td class='rep'></td>"); break; case "I": document.write("<td class='ind'></td>"); break; case "G": document.write("<td class='green'></td>"); break; case "L": document.write("<td class='lib'></td>"); break; } var barTxt = partyType for (i=0; i < percent; i++) { document.write(barText); }


Reply With Quote

Bookmarks