Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: why when I use html::form $input->name work,$input->value doesn't work ?

by fanasy (Sexton)
on Nov 14, 2010 at 06:56 UTC ( #871294=note: print w/replies, xml ) Need Help??


in reply to Re: why when I use html::form $input->name work,$input->value doesn't work ?
in thread why when I use html::form $input->name work,$input->value doesn't work ?

Thanks for your replay the input is :
my $CACTIURL = "http://www.xxx.com"; $mech->get($CACTIURL); $mech->set_visible("xxxxxx", $ADMINPASSWORD); $mech->click; my @inputs = $mech->current_form()->inputs(); foreach my $input2 (@inputs) { my $input_type= $input2->type; my $input_id= $input2->id; my $input_value= $input2->value; my $input_name= $input2->name;
  • Comment on Re^2: why when I use html::form $input->name work,$input->value doesn't work ?
  • Download Code

Replies are listed 'Best First'.
Re^3: why when I use html::form $input->name work,$input->value doesn't work ?
by Corion (Pope) on Nov 14, 2010 at 09:04 UTC

    In what sense does it "not work"?

    Does your script crash? Does it return the wrong values?

    Note that WWW::Mechanize does not understand Javascript and the HTML input has an onclick attribute, which usually is connected to Javascript.

      thanks for your reply.
      Does perl have any module which can handle the javascript on html?
      the handle means I need to let the checkbox "on"by script.
      my question is print $input->value ,the result is "" .
      if javascript, does perl have any module can handle the javascript on html?
      thanks for your replay.

        Maybe the value also is set via Javascript. You will need to inspect the HTML source code.

        For interpreting Javascript, there is WWW::Scripter and WWW::Mechanize::Firefox. The latter one is by me and needs Firefox to operate.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2021-01-21 18:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?