How Do You Get LWP To Deal With Javascript "Pop-Ups"

How Do You Get LWP To Deal With Javascript "Pop-Ups"

am 21.10.2005 00:02:35 von mark1.thompson45

Hi,
I am using LWP to navigate my way through the links on a webpage in
order to get to the data I need. I have got to the final page and it
seems that the data I need is in a "Javascript Popup". The page has the
following:-

class="nav">

It is the data in this pop-up that I need to get, forgive my lack of
knowledge here but LWP is new, whilst I have got this far I am now
completely stuck. If anyone can help it would be appreciated, a bit of
code would be even better - here's hoping.

cheers, Mark.

Re: How Do You Get LWP To Deal With Javascript "Pop-Ups"

am 21.10.2005 00:30:12 von John Bokma

mark1.thompson45@btinternet.com wrote:

> Hi,
> I am using LWP to navigate my way through the links on a webpage in
> order to get to the data I need. I have got to the final page and it
> seems that the data I need is in a "Javascript Popup". The page has the
> following:-
>
>
> class="nav">

The argument for popUp looks like a relative URL to me, so extract it, use
URI to create an absolute URL, and fetch it.

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
I ploink googlegroups.com :-)

Re: How Do You Get LWP To Deal With Javascript "Pop-Ups"

am 22.10.2005 01:16:25 von mark1.thompson45

OK, so I need to create the URL from the javascript (I think ?) anyway,
this is the part of the code where I am trying to link to:-

------------------------------------------------------------ ------------------------------------------------------------ -------------------------------------------------------
type="text/javascript">document.write(imgmapHtml);document.c lose() src="/new/ytm2006/html/images/MAIN_BANNER_2005_6.jpg" width="770"
height="72" border="0" ISMAP USEMAP="#imgareas">

border="0" cellspacing="0" cellpadding="0"> height="44" colspan="4" class="navbar">
border="0" cellpadding="0" cellspacing="0">




------------------------------------------------------------ ------------------------------------------------------------ -------------------------------------------------------

I am after the Player Lists for GK, DEF, MID or STR from this
javascript. If I click on any of these links (GK, DEF, MID, STR) in an
IE browser I get the following pages:-

http://www.youthemanager.co.uk/Clever/servlet/PlayerList?gam eid=184&catidx=1
(or catidx=2, catidx=3 etc)

I cannot workout what URL to call in my LWP::UserAgent or URI::URL call
(not sure whic to use), what ever I call the only text I get back from
the page is:-

LANGUAGE="JAVASCRIPT">location.replace("/");

help appreciated, thanks.