in reply to WWW::Mechanize and unnamed images
Looking at your HTML it is clear that your form has an action (<form .. action=".." ..>). That action specifies what web page WWW::Mechanize should fetch when you submit the form.
Now looking at your image (<input type="image"...) it is clear that this image is not designed to actually perform any function by itself. It is likely that a javascript function elsewhere has tied itself to this image to make it clickable. Whatever that may be, the important information is already encoded in the form (the action as I mentioned earlier).
So just try this code instead while paying particular attention to the <form ...> tag:
use WWW::Mechanize; use strict; my $agent = WWW::Mechanize->new(); $agent->get('http://address'); $agent->form_name('form1'); $agent->field('request', 'test'); $agent->submit(); # will go to the form's action URL print( $agent->response->content() );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: WWW::Mechanize and unnamed images
by davidrw (Prior) on Mar 02, 2006 at 14:36 UTC |