My problem is the disabled fields, they seem to be generated by javascript unlike the others. I've searched around and I found someone who had a similar problem, they suggested using HTML::Form::ForceValue. So here is my code ...bash-3.2$ mech-dump --forms "http://www.carzone.ie/usedcars/" GET http://www.carzone.ie/usedcars/index.cfm [form1] fuseaction=search (hidden readonly) MakeID= (option disabled) [*/Any Make] xMakeID= (hidden readonly)
And the output is the following:use strict; use warnings; use WWW::Mechanize; use HTML::Form::ForceValue; my $m = WWW::Mechanize->new( autocheck => 1 ); $m->agent_alias( 'Windows IE 6' ); $m->get("http://www.carzone.ie/"); $m->follow_link( url_regex => qr/Used/i ); $m->set_fields( #MakeID => '32', #ModelID => '281', #CountyID => '10', xMakeID => '32', ); $m->form_name("form1")->find_input("MakeID")->force_value("32"); $m->form_name("form1")->dump;
So it looks like it is setting the desired value, but the output is using 'Any Make', which suggests the forced value is being ignored. I'm pretty knew to this as a whole, so i'm not sure where to go from here. Any tips/advice would be greatly appreciated, thanks in advance.GET http://www.carzone.ie/usedcars/index.cfm [form1] fuseaction=search (hidden readonly) MakeID=32 (option disabled) [:/Any Make|*32] xMakeID=32 (hidden readonly)
In reply to WWW::Mechanize and disabled form field by goldfish_
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |