Chris M
Chris M

Reputation: 4115

How do the scores on this sports ticker update itself without ajax calls?

I was looking at scores at http://www.cbssports.com/nfl/scoreboard earlier and upon inspection of the code, I couldn't quite figure out how they update their scores.

I don't see any ajax calls and the games don't appear to be wrapped into iframes, etc.

Can anyone explain to me how this works?

Upvotes: 7

Views: 758

Answers (2)

Uooo
Uooo

Reputation: 6354

It seems like they are using Flash code to update the scores. I disabled Flash in my browser and got the following message:

Live Scoring Notice

However, if you want to implement something like that without using a Plugin, you can use Websockets in Javascript.

Upvotes: 1

Javon Harper
Javon Harper

Reputation: 196

Check out line 1884 of the scoreboard file. The storePlayers function will format that big string into sets of markup that is used in the ticker.

Upvotes: 0

Related Questions