Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

implementing the functions with javascript Football Player Information Page loadPlayersPage method: parameters: none purpose: This method will populate the dropdown menu to allow the user

image text in transcribed

implementing the functions with javascript

Football Player Information Page loadPlayersPage method: parameters: none purpose: This method will populate the dropdown menu to allow the user to select which player's information to view. To handle this, you will need to iterate through the players array and do the following for each player: 1. Create an anchor tag 2. Set the href to"#", this will make sure the 3. Set the onclick to call switchPlayers method 4. Set the anchor tag's text to the player's name. anchor tag doesn't change pages (this will need to pass in the index inside the players array) After setting all of the anchor tags, update the innerHTML of the dropdown menu. As a note, the id for the dropdown menu is player_selector. switchPlayers (playerNum) method: parameters: playerNum The index of the football player in the players array. purpose: This method will update the the spans on the player's information pagex and calculate the average passing, rushing, and receiving yards. Span ids: the player's year in college - the player's major in college - the number of games played for Buffs p_year pmajor g_played player_img the player's photo (must set src and alt p_y r_yardsthe number of rushing yards rec yardsthe number of receiving yards ards - the number of passing yards Calculated values: ards - the average number of passing yards for the player's Buff career avg_p_ avg_r_yards the average number of rushing yards for the player's Buff career avg_rec_yards -the average number of receiving yards for the player's Buff career Football Player Information Page loadPlayersPage method: parameters: none purpose: This method will populate the dropdown menu to allow the user to select which player's information to view. To handle this, you will need to iterate through the players array and do the following for each player: 1. Create an anchor tag 2. Set the href to"#", this will make sure the 3. Set the onclick to call switchPlayers method 4. Set the anchor tag's text to the player's name. anchor tag doesn't change pages (this will need to pass in the index inside the players array) After setting all of the anchor tags, update the innerHTML of the dropdown menu. As a note, the id for the dropdown menu is player_selector. switchPlayers (playerNum) method: parameters: playerNum The index of the football player in the players array. purpose: This method will update the the spans on the player's information pagex and calculate the average passing, rushing, and receiving yards. Span ids: the player's year in college - the player's major in college - the number of games played for Buffs p_year pmajor g_played player_img the player's photo (must set src and alt p_y r_yardsthe number of rushing yards rec yardsthe number of receiving yards ards - the number of passing yards Calculated values: ards - the average number of passing yards for the player's Buff career avg_p_ avg_r_yards the average number of rushing yards for the player's Buff career avg_rec_yards -the average number of receiving yards for the player's Buff career

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions

Question

What is polarization? Describe it with examples.

Answered: 1 week ago