Automated Online Football League Result

Generate a football league table
displaying the football results and appropriate information as listed below:
You should be able to:

  • select the teams from two drop-down lists or sets of radio buttons
  • enter the scores into text boxes (text boxes cannot be empty)
  • automatically create a table to display the following for each match played:
  • number of match played
  • number of match : win, draw, lost
  • number of goals scored for and against
  • differences between goals scored for and against
  • 3 points for a win
  • 1 point for a draw
  • 0 point for a lost

Assume there are eight teams in the League and each team plays seven matches.
You should not be able to select the same team from the two drop-down list or the set
of radio buttons.
 sort the table by starting with the highest scores to the lowest ones (use of
array)
 the football league table can be displayed either within the document or on an
alert box.

Okay so I know I need to create an array to store the teams , then create two drop down box to select the teams.
But then can someone explain me how to do the rest ? Like assigning the score and generating a table ?

Okay so I know I need to create an array to store the teams , then create two drop down box to select the teams.
But then can someone explain me how to do the rest ? Like assigning the score and generating a table ?

There is a huge gap between the variable assignment and basic form input, and what you’re asking. What have you tried so far?

var teams = ["Liverpool", "Chelsea", "Manchester United", "Arsenal", "Manchester City" , "Totenham Hotspur","Everton","Leicester city"] , scores = {};

function Score() {
	
  this.plays = 0;
  this.goalsScored = 0;
  this.goalsAgainst = 0;
  this.matches = [];
  
  this.matchesPlayed = function() {
  	return this.matches.length;
  }

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.