in reply to mechanize and javascript

Java is not JavaScript. Anyway, try Win32::IE::Mechanize or Mozilla::Mechanize