in reply to WWW::Mechanize and javascript
Basically, you need to figure out what the javascript does -- look at the SetOkCode function, see what it does, and keep following along -- to figure out where you need to go next.