How to follow a Java script link



Hello all

I am trying to harvest a set of information from a search service that gives the results of the search by pages.
I am interested in ALL of the results.
I can activate the search and obtain the first page with results. but when I try to follow the link for the next page I cant do it since the link is a Java script code at the source.

I am using a WWW::Mechanize agent to do this procedure and i have tried
$link = $mech->find_link (text, "mytext")
$link = $mech->find(textregex, qr/myregex/i).....etc
then
$url = $link->url()
and finally
$mech->get ($url)the code does not work not because I am not able to get the link but because the link calls a Java script argument which is then interpreted to generate the next page.

I have also tried the following methods from the WWW::mechanize module

follow_link (this one does not work for the same reason presented before) and
clik_button (this one does not recognize the link as a valid button)

non of them work

The link points to this code

"javascript:mySubmit( 2, 're_search', 25) "
on this reference
<a href="javascript:mySubmit( 2, 're_search', 25) ">previous</a>




---------------------------------
Do You Yahoo!?
Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo.
Visíta Yahoo! Noticias.