Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: WWW::Mechanize and input type=image

by ikegami (Patriarch)
on Oct 16, 2004 at 17:54 UTC ( [id://399786]=note: print w/replies, xml ) Need Help??


in reply to Re^2: WWW::Mechanize and input type=image
in thread WWW::Mechanize and input type=image

I created this HTML:
<form action="test.cgi" method="GET"> <tr> <td bgcolor="white"><img height="1" width="1" src="px. +gif"></td> <td bgcolor="white" colspan="2"><input type="password" + name="htmPassword" size="10" class="rtnavinput"></td> <td bgcolor="white"><input type=image src="/images/btn +GoRed.gif" width="15" height="15" border="0"></td> <td bgcolor="white"><img height="1" width="1" src="px. +gif"></td> </tr> </form>

to see what gets sent. It fetches:

.../test.cgi?htmPassword=&x=8&y=10

So maybe you need to do something like this:

$mech->set_fields(x => 1, y => 1); $mech->submit();

The script probably doesn't attention to the x and y, in which case you could do simply:

$mech->submit();

(Untested, and I'd never used WWW::Mechanize.)

Replies are listed 'Best First'.
Re^4: WWW::Mechanize and input type=image
by dba (Monk) on Oct 16, 2004 at 21:01 UTC
    Thanks for your input. However, a simple submit or submit_form is not working.

    FYI, there are several forms in the same page.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://399786]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-26 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found