monarch has asked for the wisdom of the Perl Monks concerning the following question:

I am using WWW::Mechanize. I can successfully log in and navigate a series of webpages for my application.

One of the webpages has a button I need to press, and it is coded as:

<button type="button" onClick="submitForm('page','otherurl.cgi')> Press Here </button>
.. the problem is that the declaration of the form <form name="page" action="firsturl.cgi"> points to a different URL.

I've read the documentation; now I'm asking you.. is there a way of submitting a form to a URL other than the one encoded in the action field of the form?

Update: thanks to davidrw for a very helpful response. That does exactly what I want.

Replies are listed 'Best First'.
Re: WWW::Mechanize->submit_form to a different action/URL
by davidrw (Prior) on Nov 25, 2005 at 02:42 UTC
      Aah thankyou, I had never been aware of the HTML::Form attributes.