in reply to mechanize and javascript
For this limited of a use of javascript, I think you'd be better off trying HTTP::Recorder.
- tye