in reply to Re: https javascript form
in thread https javascript form

Thank you very much for your reply. It makes perfect sense to follow your tutorial :-)

Only problem is that my login form has these three javascript input fields:

<p>name="ctl00$MainContent$Login1$UserName"</p> <p>name="ctl00$MainContent$Login1$Password"</p> <p>name="ctl00$MainContent$Login1$LoginButton"</p>

and I have no idea how to figure out how they work. I have tried looking at LIVE HTTP Header but the url that I think is relevant only puts the names like this:

ctl00%24MainContent%24Login1%24UserName=[MYUSERNAME]&ctl00%24MainConte +nt%24Login1%24Password=[MUPASSWORD]&ctl00%24MainContent%24Login1%24re +memberMeCheckbox=on&ctl00%24MainContent%24Login1%24LoginButton=Log+in +d

Replies are listed 'Best First'.
Re^3: https javascript form
by bib (Initiate) on Jun 12, 2013 at 17:55 UTC
    Now I have with success filled in the form's username and - I think - all other fields except the password which has no 'value' field. How do i get around that?
      Does the field have a 'name'? 'value' or 'name' can work. I would need to inspect the HTML of the page itself if you can post the login page link, too
        Yes the field has a name:
        ctl00$MainContent$Login1$Password
        This is the login page:

        http://jyllands-posten.dk/j_spring_openid_security_check?openid_identifier=https://polid.jppol.dk&branding=JPPremLogo

        Wauw, it's really nice of you to take a look at it! Thanks!
      see if this works:
      use WWW::Mechanize; my $usr = "your_username"; my $pw = "your_password"; $mech->form_number(1); $mech->field( "ctl00$MainContent$Login1$UserName", $usr); $mech->form_number(2); $mech->field("ctl00$MainContent$Login1$Password", $pw); $mech->click(); $mech->dump_text; # for debugging
        I have tried that but it doesn't work :-(

        Could it have something to do with the 'action' field? How do I set that in a form?

      See if
       $mech->click_button(value => "Log ind");
      works after you filled in the fields successfully
        Nope. It doesn't work either.

        I have a feeling that it has something to do with the 'action'-url contained in the form. Could that be true? and how do I implement it in my submit_form? I have being searching for examples but haven't found any relevant yet.