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

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

    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

<a href="javascript:popUp('PlayerList?gameid=184&catidx=1')"

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" wrote:

Quoted text here. Click to load it

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:
               Perl programmer available:
                                        I ploink :-)

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

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:-

src="/new/ytm2006/html/images/MAIN_BANNER_2005_6.jpg" width="770"
height="72" border="0" ISMAP USEMAP="#imgareas"><table width="770"
border="0" cellspacing="0" cellpadding="0"><tr valign="top"><td
height="44" colspan="4" class="navbar"><table width="770" height="34"
border="0" cellpadding="0" cellspacing="0"><tr>
        <td width="540" valign="top" class="nav"><img
src="/new/ytm2006/html/images/game.gif" width="69" height="33"
hspace="5" align="absmiddle"><a
class="nav">How to play</a> | <a
class="nav">Scoring points</a> | <a
class="nav">Transfers</a> | <a
class="nav">Mini leagues</a> | <a
class="nav">Hall of Fame</a> | <a
class="nav">Prizes</a> | <a
class="nav">Monthly Game</a></td>
        <td width="230" class="nav"><div align="left"><img
src="/new/ytm2006/html/images/stats.gif" width="90" height="33"
hspace="5" align="absmiddle"><a
class="nav">GK</a> | <a
class="nav">DEF</a> | <a
class="nav">MID</a> | <a
class="nav">STR</a> </div></td>


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:-
(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:-


help appreciated, thanks.

Site Timeline