I think the problem may be that you are trying to nest a form within a
table. The only way you can put a form inside a table is if the form
lies entirely within one cell of the table. A table may reside
entirely within a form of course.
I'm not sure if that's the problem because i can work with the form
assing values to the fields of uname and upass. I've tried to find a
solution for this issue in google but couldn't find a solution that
works.
May be a little more information will help i'm using mechanize 2.0.1 and
this is some of the code that i use for sending the form.
logeado = agent.submit(log)#i used this after other unsuccessful atempts
to
#submit the form. I'm not sure if the agent.submit is clicking the right
#button but it returns a response but...
sl = logeado.field("country") #i got the error undefined method 'field'
for Mechanize::page:0xxxxxxxx
The first thing to do is to get to valid html. You cannot make any
conclusions about anything with invalid html. To check that it is
valid view the page source (View > Page Source or similar in your
browser) copy the complete text and paste it into the w3c html
validator. When you have invalid html the browser (which will know
that it is invalid) has to guess what you meant and it may not guess
the way you intended.
There is no point doing anything else until you have valid html. A
golden rule of problem solving, if you know that something is not
right then fix it before worrying about other things that may or may
not be part of the problem.
The first thing to do is to get to valid html. You cannot make any
conclusions about anything with invalid html. To check that it is
valid view the page source (View > Page Source or similar in your
browser) copy the complete text and paste it into the w3c html
validator. When you have invalid html the browser (which will know
that it is invalid) has to guess what you meant and it may not guess
the way you intended.
There is no point doing anything else until you have valid html. A
golden rule of problem solving, if you know that something is not
right then fix it before worrying about other things that may or may
not be part of the problem.
Colin
Thanks for this information, i didn't know that w3s have a validator for
html, now i can use it to check things faster that using firebug or
other things.
It seems like the site have a lot of things wrong, like i spected for
what i saw the first time in the source code, but the thing here is that
i don't own that site so i can't do something about that issues.
The first thing to do is to get to valid html. You cannot make any
conclusions about anything with invalid html. To check that it is
valid view the page source (View > Page Source or similar in your
browser) copy the complete text and paste it into the w3c html
validator. When you have invalid html the browser (which will know
that it is invalid) has to guess what you meant and it may not guess
the way you intended.
There is no point doing anything else until you have valid html. A
golden rule of problem solving, if you know that something is not
right then fix it before worrying about other things that may or may
not be part of the problem.
Colin
Thanks for this information, i didn't know that w3s have a validator for
html, now i can use it to check things faster that using firebug or
other things.
It seems like the site have a lot of things wrong, like i spected for
what i saw the first time in the source code, but the thing here is that
i don't own that site so i can't do something about that issues.
I don't understand, you are trying to get a form working on a site
that you do not have control over?
OK, sorry, I had forgotten what your original question was. I was
thinking that you were describing a problem specific to the form that
you provided the detailed html for. Your best bet might be the
mechanize mailing list (see http://mechanize.rubyforge.org/). Of
course it may be that what you want to do is not possible as mechanize
might not be capable of interpreting the invalid html.