Does this look correct?
the top bit where i am defining my variable "idName", is this the correct way of doing it, i am having problems with errors and not seem to figure it out!
JavaScript Beginner at work
Code:
function draw_stats(name, games_played, wins, loss, win_streak, win_percentage, idName) {
document.write("<tr align='center' id='" + idName + "' onmouseover=\"this.bgColor='#eaffea'\" onmouseout=\"this.bgColor='white'\">");
document.write("<td class='font'>");
document.write(name);
document.write("</td>");
document.write("<td class='font'>");
document.write(games_played);
document.write("</td>");
document.write("<td class='font'>");
document.write(wins);
document.write("</td>");
document.write("<td class='font'>");
document.write(loss);
document.write("</td>");
document.write("<td class='font'>");
document.write(win_streak);
document.write("</td>");
document.write("<td class='font'>");
var value = Math.round(win_percentage * 100) / 100
document.write(value + "%");
document.write("</td>");
document.write("</tr>");
}
the top bit where i am defining my variable "idName", is this the correct way of doing it, i am having problems with errors and not seem to figure it out!
JavaScript Beginner at work