From: Ryan Leavengood Date: 2007-06-27T06:52:38+09:00 Subject: Re: Following a Javascript Link Using Mechanize On 6/26/07, Matt White wrote: > > If I try to "click" the link, Mechanize raises an "unsupported scheme" > exception. At this point I am using all sorts of fun regular > expressions to parse the Javascript and send the appropriate values to > the page with a WWW::Mechanize.post call. Is there an easier way? > Thanks. This would require Mechanize to have a Javascript interpreter. In theory this is possible (there are several open source Javascript interpreters), but for most cases this is a bit of overkill. Of course with all the AJAX sites these days it might not be a terrible idea. In addition the HTML parser might need to be better and would need to provide a DOM interface for the Javascript to use. Either way it is a big complicated project, and I doubt something the Mechanize maintainer would want to implement. If you REALLY want to look into this I would recommend taking a look at the WebKit (www.webkit.org) Javascript interpreter, it seems to be pretty self-contained and quite fast. Ryan