cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Calling JavaScript Functions using Curl

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Wed, 22 Sep 2010 14:58:22 -0400

On Wed, Sep 22, 2010 at 2:26 PM, bharadwaj nagendra <
bharadwaj.nagendra_at_gmail.com> wrote:

> Hi All,
>
>
>
> I am working on a shell script to download data from website . I am using
> cURL libraries.
>
>
>
> I encountered a page where the button on click event looks like
>
>
>
> <a id="theForm:downloadLabel1" href="#" style="text-decoration: none;
> color: rgb(255, 255, 255);" onclick="if(typeof jsfcljs ==
> 'function'){jsfcljs(document.forms['theForm'],'theForm:downloadLabel1,theForm:downloadLabel1','');}return
> false" class="button">Summary</a>.
>
>
>
> can anyone show the way to use cURL libraries and call the onclick event in
> the above scenario.
>

The problem you're going to run into is in evaluating this:

       document.forms['theForm']

document.forms is a construct created by the web browser while parsing the
html. Curl doesn't do that, so you can't reference document.forms.

Ralph Mitchell

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-22