in reply to Re: Multiple NONAME buttons and WWW::Mechanize
in thread Multiple NONAME buttons and WWW::Mechanize

As you can see there is JAVASCRIPT code. Could that screw up the parsing? Should I use LWP module instead or do a one off hack?
  • Comment on Re^2: Multiple NONAME buttons and WWW::Mechanize

Replies are listed 'Best First'.
Re^3: Multiple NONAME buttons and WWW::Mechanize
by dneedles (Sexton) on Feb 06, 2010 at 06:04 UTC
    I see that Mechanize doesn't handle java script and the buttons invoke java script. I'll see if I can preprocess within PERL and hack around to invoke the button.
      A quick follow up. In short the problem was that Mechanize and LWP do not interpret client side java script. There is a module that was just released that hooks into mechanize: WWW::Scripter::Plugin::JavaScript But it is very new and not yet recognized by the Mechanize owner. In the end the java script was rather simplistic. I added two lines to the form call, adding values for the two hidden variables and the server side CGI did the rest.
      Did you find a resolution for this problem? I'm stuck at exactly the same place.

        What part of this do you have problems with?

        I see that Mechanize doesn't handle java script and the buttons invoke java script.

        WWW::Mechanize does not handle Javascript.

        You will need to use a module that understands Javascript, like WWW::Scripter, or maybe WWW::Mechanize::Firefox.