On Jun 26, 2007, at 11:33 AM, Matt White wrote:
> Hello,
>
> I am on a page that lists 78 items and can only show 25 per page,
> so there are links for each page of results and a "Next >"
link.
> I''d like to get Mechanize to follow the Next link but the link
> looks like this:
>
> <a class=''searchlinks''
href=''javascript:lnkclick(2);''>Next ></a>
>
> 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.
Not yet, I don''t think. Javascript support would be awesome, but
it''s a heafty beast to tackle. The last time I needed to do
javascript stuff, i basically ended up using a combination of regexps
and lots of code tracing to make the same requests that the
javascript would have made. Charles is a handy tool for viewing the
final request.
-Mat
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/mechanize-users/attachments/20070629/b3f5909a/attachment.html