Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: submitting nameless form using WWW::mechanize

by ww (Archbishop)
on Jun 19, 2008 at 02:29 UTC ( [id://692836]=note: print w/replies, xml ) Need Help??


in reply to Re^2: submitting nameless form using WWW::mechanize
in thread submitting nameless form using WWW::mechanize

There is no action for the <form> that you're showing us (without which it can't "do" anything, nor does <input type="button" value="Login" class="loginBoxTextStyle" onclick="return savesettings();"/> clarify much other than to make it clear you're dealing with a js function.

Is it possible that the page is broken (even when visited with your browser), or that you missed something in the .html?

Update: "can't" above is badly stated; even without an action, use of <form> and subordinate elements will effect rendering. But worse, even though the OP's code update made it clear (duh! even to me!) that the issue was at least in part a js issue, I didn't consider that in the flat "can't." Bah! And apologies for careless thought.

However, parv's question below about the default action (when none is specified) sent me checking the w3c's html 4.01 specification. I may still have missed something, and, as always, it's well to remember that browser-writers sometimes :-) build browsers that are not fully conformant.

Nonetheless, what follows is what I found:

<!ATTLIST FORM
  • %attrs;               -- %coreattrs, %i18n, %events --
  • action %URI; #REQUIRED -- server-side form handler --
  • ...
  • onsubmit %Script; #IMPLIED -- the form was submitted --

....

action = uri CT
  This attribute specifies a form processing agent. User agent behavior for a value other than an HTTP URI is undefined.

Replies are listed 'Best First'.
Re^4: submitting nameless form using WWW::mechanize
by parv (Parson) on Jun 19, 2008 at 02:32 UTC
    Missing an explicit "action", does the "action" not default to the current URL?
Re^4: submitting nameless form using WWW::mechanize
by opensourcer (Monk) on Jun 19, 2008 at 05:14 UTC
    it's ISP page to for login to active the internet session.
    the extension of page is something like ".do" e.g: http://xxxx/xxx/xx.do.
    I'm writing a script so that i can login to page whenever i get disconnected.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://692836]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-03-29 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found