title: Target an image/javascript link with Mechanize
body: <p>I'm trying to use Mechanize to click a link with no text, only an image. The <code>href</code> is a Javascript function. Here's the link:</p>
  
  <pre><code>&lt;a href='javascript:nextButton(this.form)'&gt;
      &lt;img src=./images/next.gif border=0 alt=Next width=20 height=20&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>I'm using the sample code:</p>
  
  <pre><code>agent = Mechanize.new
  page = agent.get(url)
  
  next_page = agent.click(page.link_with(:text =&gt; /Sign In/)) # Change to??
  </code></pre>
  
  <p>But I don't know how to target something with no text. I'm guessing that I could either target the <code>img src</code> or the <code>alt</code> text, both of which are unique.</p>