(sorry for duplicate email here, I fat-fingered the keyboard and sent
the previous email too soon)
Just getting started with Mechanize. Loving it. So thanks for the library.
Question about what is considered normal behavior when using a form''s
#submit method.
I have a search form, assume it is page.forms[0], when I submit my
first search I get results back that contain the following form:
#<WWW::Mechanize::Form
{name "show_Next"}
{method "POST"}
{action ""}
{fields ...
Action is empty. When I submit *this* form with
results = agent.submit(show_next)
It doesn''t appear to be submitting the form to the same URL the form
came from. My results doesn''t contain anything like what I get if
I''m
in a browser and I click the Next link. All I get back is the main
page for the web site in question. On the original search form that
I''m submitting, action is a URL with an embedded session ID.
However, if I do this:
action = page.forms[0].action
show_next.action = action
results = agent.submit(show_next)
Then results contains the next results page for the query in question.
So obviously there is a way to resolve the underlying need of POSTing
the form to the right URL, but I''m wondering if this is an expected
behavior or if there is a better way to work around this.
Thanks,
Michael Libby.