Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Clicking a checkbox using www::mechanize

by Anonymous Monk
on May 11, 2004 at 20:26 UTC ( #352584=note: print w/replies, xml ) Need Help??


in reply to Re: Clicking a checkbox using www::mechanize
in thread Clicking a checkbox using www::mechanize

What do you mean by "fake" the javascript?
  • Comment on Re: Re: Clicking a checkbox using www::mechanize

Replies are listed 'Best First'.
Re: Re: Re: Clicking a checkbox using www::mechanize
by nmcfarl (Pilgrim) on May 11, 2004 at 21:16 UTC

    To fake the javascript, you read it , and figure out what it does. Then do those actions in perl (or ignore them if you don't care.) In this case it might look like code that follows , but it all depends on what the javascript does.

    $agent->submit_form( form_name => 'hidden_form', fields => { 'newfield1' => 'val1', 'newfield2' => 'val2' }, );
      This is what the javascript looks like, how do you think I can fake it.
      function __doPostBack(eventTarget, eventArgument) { var theform = document.Home; theform.__EVENTTARGET.value = eventTarget; theform.__EVENTARGUMENT.value = eventArgument; theform.submit(); }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2023-03-20 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (59 votes). Check out past polls.

    Notices?