<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Thanks Mat.<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Mat Schaffer <schapht@gmail.com><br>To: Ruby Mechanize Users List <mechanize-users@rubyforge.org><br>Sent: Friday, June 29, 2007 7:22:40 AM<br>Subject: Re: [Mechanize-users] (no subject)<br><br>
<br><div><div>On Jun 26, 2007, at 11:33 AM, Matt White wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Hello,<br><br>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:<br><br><a class='searchlinks' href='javascript:lnkclick(2);'>Next ></a><br><br>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.</div></div></blockquote><br></div><div>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.</div><div>-Mat</div><div>_______________________________________________<br>Mechanize-users mailing list<br>Mechanize-users@rubyforge.org<br><a target="_blank" href="http://rubyforge.org/mailman/listinfo/mechanize-users">http://rubyforge.org/mailman/listinfo/mechanize-users</a></div></div><br></div></div><br>
<hr size=1><a href="http://us.rd.yahoo.com/evt=48226/*http://new.toolbar.yahoo.com/toolbar/features/norton/index.php">Get the free Yahoo! toolbar</a> and rest assured with the added security of spyware protection.
</body></html>