Hi everyone,
I am trying to sign in to a site. The form consists of a username and password field. No problem. But the action attribute of the Form is set to nil (""). So mech->submit invokes the wrong url.
Looking at the form, I find the routine below to validate the password and determine where the form should be POSTed to. I can figure out what the action URL should be. But I do tell Mechanize where it should post to?
Thanks in advance
Peter
function validatePwd(form) {
hostName = pick some arbitrary host name ;
if (document.login.PASSWORD.value.length < minLength) {
...
} else {
document.login.action="https://" + hostName +
"/some-login-script";
document.login.submit();}
}
