Eros Tamas Akos wrote:
>[...]
> i realized that in the html code of that webpage there is no action field
> specified for the second form!
> do you think that this is the reason i don't see the second form in the
> @forms?

Yes.
And that's bad HTML.  The W3C DTD for HTML clearly states that
'action' is a required attribute for 'form' elements.


I will consider a solution.


In the meantime, read the documentation for TreeBuilder and Element
both, and consider something like:

my @forms = $x->find_by_tag_name('form');
# Correct for action-less forms:
foreach (@forms) {
  $_->attr('action', $url_of_the_page)
   unless defined $_->attr('action');
}
then go accessing whatever you want in @forms, however you want.

Anyhow, might HTML::Form be better for what you're doing?

--
Sean M. Burke    [EMAIL PROTECTED]    http://www.spinn.net/~sburke/

Reply via email to