I do not see the people "electing" anyone in this passage. Jehoiada, the reigning king, is initiating all of the action (v.1). When the people covenant with him in v.3, they are expressing their submission. But it is the king ruling by putting his son on the throne (see vv.10-11) - the end of v.3 is Jehoiada speaking ("And he [Jehoiada] said unto them, Behold...") and showing faith in the promise, not the people. Again in vv. 10-11: "And he [Jehoiada] caused all the people to stand (every man with his weapon in his hand) from the right side of the house, to the left side of the house by the altar and by the house round about the king. Then they brought out the king’s son, and put upon him the crown and gave him the testimony, and made him King. And Jehoiada and his sons anointed him, and said, God save the king."