Does any site provide this html code? (auto-updated team scores)

I was thinking of ways to brag about a sports team I like on my myspace profile. Is there any site that provides code that updates itself automatically?

I was thinking of something like this:

Team: W## L##

games ahead

Has it been done?

Thanks in advance…

-C_e

HTML code can’t update itself automatically. If you really felt like it, you could write some Javascript to fetch the scores from somewhere and dynamically write them per-request.

The website that you scrape them from might not appreciate it, though.

Really? I thought you had to use server-side programming to do that. How do you do it with JavaScript?

Oops, I think you’re right. I tried doing it using an XMLHTTPRequest to fetch a foreign URL, but it appears to be a security violation.

You sure you can’t pull it from a webservice with the appropriate client-side jscript code?

Actually, the XMLHTTPRequestObject would be the way to go (Microsoft has some pages documenting the feature here.

Of course, you’d have to parse the page to find where the scores you want to pull are, but most teams have their own webpages and publish their scores on the front page.

However, the code will break any time the page is modified…