title: Screenscaping aspx with Python Mechanize - Javascript form submission
body: <p>I'm trying to scrape UK Food Ratings Agency data <em>aspx</em> seach results pages (e.,g <a href="http://ratings.food.gov.uk/QuickSearch.aspx?q=po30" rel="noreferrer">http://ratings.food.gov.uk/QuickSearch.aspx?q=po30</a> ) using Mechanize/Python on scraperwiki ( <a href="http://scraperwiki.com/scrapers/food_standards_agency/" rel="noreferrer">http://scraperwiki.com/scrapers/food_standards_agency/</a> ) but coming up with a problem when trying to follow "next" page links which have the form:</p>
  
  <pre><code>&lt;input type="submit" name="ctl00$ContentPlaceHolder1$uxResults$uxNext" value="Next &gt;" id="ctl00_ContentPlaceHolder1_uxResults_uxNext" title="Next &gt;" /&gt;
  </code></pre>
  
  <p>The form handler looks like:</p>
  
  <pre><code>&lt;form method="post" action="QuickSearch.aspx?q=po30" onsubmit="javascript:return WebForm_OnSubmit();" onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_ContentPlaceHolder1_buttonSearch')" id="aspnetForm"&gt;
  &lt;input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /&gt;
  &lt;input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /&gt;
  &lt;input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" /&gt;
  </code></pre>
  
  <p>An HTTP trace when I manually click Next links shows __EVENTTARGET as empty? All the cribs I can find on other scrapers show the manipulation of  __EVENTTARGET as the way of handling Next pages.</p>
  
  <p>Indeed, I'm not sure how the page I want to scrape ever loads the next page? Whatever I throw at the scraper, it only ever manages to load the first results page. (Even being able to change the number of results per page would be useful, but I can't see how to do that either!)</p>
  
  <p>So - any ideas on how to scrape the 1+N'th results pages for N>0?</p>