Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help using WWW::Mechanize to follow links

Status
Not open for further replies.

1newby1

Programmer
Jun 23, 2006
3
US
I've been trying to get to access this link, but everytime it tries to access the link, either with $mech->links() or $mech->follow_link(...) I get the error "Error GETing javascript:self.close<>: Protocol scheme 'javascript' is not supported..." Thanks for your help.
 
Probably, the link is calling a JavaScript function on the site... the HTML probably looks something like this:

Code:
<a href="javascript:self.close()">Close Window</a>

Or something along those lines... doesn't have a JavaScript interpreter and therefore it can't access that link. It only follows links on protocols it supports (i.e. HTTP protocol).
 
Kirsle is correct. There is no javascript support in Mechanize or LWP or any of the other modules that I have looked at on CPAN.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top