Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: WWW::Mechanize and javascript

by Agyeya (Hermit)
on Jun 04, 2004 at 08:24 UTC ( [id://360763]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: WWW::Mechanize and javascript
in thread WWW::Mechanize and javascript

The page I am acquiring through a WWW::Mechanize object, is on loading calling a javascript code for onload. The code is given below. I have read around, but am not able to figure out how to emulate this javascript function.
If somebody could please point me in the appropriate direction.
<script language="javascript"> function window_onload() { document.getElementById("divCal").style.display="block"; document.getElementById("divMessage").style.display="none"; } </script>
Update
Ok understood, as i dont have to display the page, only have to scrape it, the above code is not necessary to be emulated by me.
Thank you for your help.

Replies are listed 'Best First'.
Re^5: WWW::Mechanize and javascript
by tomhukins (Curate) on Jun 04, 2004 at 08:47 UTC

    Unless you wish to display the page, you can ignore this code. It's just setting CSS attributes for the elements whose IDs are divCal and divMessage.

    If you want to understand what's going on, you should learn about DOM.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found