Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

submitting nameless form using WWW::mechanize

by opensourcer (Monk)
on Jun 18, 2008 at 06:40 UTC ( #692634=perlquestion: print w/ replies, xml ) Need Help??
opensourcer has asked for the wisdom of the Perl Monks concerning the following question:

hi,

how can i submit a nameless form using WWW:Mechanize or in any other way?

-opensourcer

Comment on submitting nameless form using WWW::mechanize
Re: submitting nameless form using WWW::mechanize
by Corion (Pope) on Jun 18, 2008 at 06:49 UTC

    Submit it by number instead, like the synopsis of WWW::Mechanize shows:

    $mech->submit_form( form_number => 3, fields => { username => 'mungo', password => 'lost-and-alone', } );
      it's a nameless form <form> .... </form>
      i have checked for form number using $mech->forms()
      which displays nothing .

        Every form has a number. You start counting by 1 and increment the form number whenever a new form starts. Just try it:

        $mech->form_number(3); # selects the third form on the page $mech->submit; # submits the third form
        Count, you know 1, 2, 3, 4, 5 , 6, 7, 8, 9, 10, them select the form 3rd form on the page
        "i have checked for form number using $mech->forms() which displays nothing."

        This might be due to JavaScript generated forms, which are really a pain in the ***. Try to look at the source through your preferred webbrowser and see what's going on there. If the form is there, without a name, indeed simply count them (and don't forget hidden forms ;-)

        --
        b10m

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://692634]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2014-08-01 04:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls