Simon Willison’s Weblog

Subscribe

Items in Feb, 2003

Filters: Year: 2003 × Month: Feb × Sorted by date


Image Drag bookmarklet

I got a good response to yesterday’s call for help on finding an HTML element’s co-ordinates on a page. I ended up using PPK’s findPos functions which seemed to do the trick just fine.

[... 338 words]

Help needed

Does anyone know if it is possible to find an HTML element’s exact position on the page (in terms of pixels-from-the-top and pixels-from-the-left) using javascript? The element I have in mind is an image that has not had any positioning applied to it, but I imagine any solution will work for other elements as well. I need something that works in Mozilla/Phoenix, although a solution for IE would be nice as well. It’s for a bookmarklet I’m thinking of writing.

[... 85 words]

Real girls eat beef

Cool-2B-Real is a site for teenage girls. Real girls are “keepin’ it real” by building strong bodies and strong minds... and they’re feeling great about themselves! It has health and fitness tips, tips on feeling good about yourself, a poll (“What type of beef do you most like to eat with your friends?”), and a set of Smart Snackin’ recipes such as Nacho Beef Dip, Beef on Bamboo, Easy Beef Chili and Roast Beef and Veggie Wrap. And beef games too.

[... 110 words]

Meetup needs work

It looks like Scott got burned by a PHP MeetUp arranged at an out of business restaurant that then failed to materialise at all. From his comments it seems like he’s not the only person to hit problems. I have yet to attend a meetup (the Bristol UK ones rarely have anyone sign up for them) but I love the concept, so it’s a real shame to hear about problems like this. Hopefully the MeetUp team are working on ways to stop this kind of thing from happening—some kind of short-lived email mailing list for each location/event might go some way to ensuring people who sign up for them know what’s going on and bother to show up. At least their recent changes page shows that they have been actively trying to improve the overall experience.

[... 145 words]

A better phoenix icon

And over on Blogzilla, Lim Chee Aun has finally solved the niggling bug with Phoenix 0.5 on Windows where the icon shown in the taskbar is an ugly default Windows image.

[... 36 words]

Better mouse gestures

Optimoz have released Version 0.3.5 Release Candidate 3 of their mouse gestures add-on for Mozilla based browsers. I hadn’t tried the version 0.3.5 series before and the improvements are impressive to say the least:

[... 171 words]

Enhanced textareas

Via Leonard Lin, a nice demonstration of an enhanced HTML text area (with buttons to add tags) that works in IE, Mozilla and Phoenix. Until recently this had not been possible thanks to a long standing Mozilla bug.

[... 54 words]

More YAML

Paul Tchistopolskii’s XML Alternatives reminded me to take another look at YAML. The specification has been updated since I last looked and seems to be a bit more complicated, but it’s still a very nicely designed format. Implementations are available for Perl, Python and Ruby with C and Java on the way but strangely no one seems to be doing one for PHP yet. I’m doing a course at Uni on compilers at the moment which includes quite a lot of stuff about writing parsers so I’m very tempted to have a go at a YAML implementation in the next few weeks just to try stuff out. The possibility of easily swapping relatively complex data structures between PHP and Python is pretty tempting as well.

[... 137 words]

The slashdot effect

Dave Winer asks why Joel Spolsky gets much more traffic when slashdotted than UserLand’s hosted sites tend to. Joel explains (it’s all down to network effects) and mpt kicks in a few ideas as well.

[... 57 words]

Zeldman and definition lists

I’m really liking Jeffrey Zeldman’s latest redesign. Aside from a pretty face, the markup holds some interesting ideas as well. For example, I’ve never seen a definition list used for a blogroll style list before:

[... 194 words]

More on screen scraping

In response to yesterday’s screen scraping post, Richard Jones describes a screen scraping technique that uses PyWebPwerf, a Python performance measuring tool.

[... 80 words]

Vellum on Windows

Via Paul Freeman, detailed instructions for installing Stuart’s Vellum Python blogging system on Windows using either IIS or Apache.

[... 32 words]

Mechanize the web

Via Keith Devens, Screen-scraping with WWW::Mechanize describes how Perl’s WWW::Mechanize module can be used to grab information from sites that require a user login. I’ve always dismissed screen scraping as something of a wasted effort, given the fact that a major rewrite of the scraper is required whenever the target site tweaks its HTML. This article has encouraged me to reconsider—some of the functionality in WWW::Mechanise is fantastic:

[... 262 words]

Types

Years

Months

Tags