Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have to get the data from one url where it is using a javascript function to populate the data.

I use this for normal pages.

$req = $ua->request( $form->click() );

In web page <td width='10%'><input type='submit' value='Go' onclick='RunAllShip();'></td>

So I need to call RunAllShip() function which also included in html source.

Please help me in this.

20080618 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

Replies are listed 'Best First'.
Re: Retrieving data from web where Javascript is included
by marto (Cardinal) on Jun 18, 2008 at 12:19 UTC
      Thanks for the response. Right now I am using perl v5.6.1. It is asking for v5.8.0 can you suggest me in this?
        Did you read my previous post, I mentioned reading How do I post a question effectively?. With that in mind you say, "It is asking for v5.8.0", what is "It"? Also Perl 5.6.1 is pretty old, have you considered installing a modern version of perl (perhaps to a different path, as the 5.6.1 version may be being used by your OS).?

        Martin
Re: Retrieving data from web where Javascript is included
by psini (Deacon) on Jun 18, 2008 at 12:20 UTC

    In general the best method is to understand what the js call do and mimic its behavior.

    Careful with that hash Eugene.