Link to home
Create AccountLog in
Avatar of stuamos8
stuamos8

asked on

Grabbing ASP/Javascript generated content from websites?

Hello,

Please see attached code snippet.  The link fetches publicly available details from a database of registered candidates.    I'm curious to know whether it is, in theory, possible to write a script to grab the content generated by such a link?

Many thanks,
Stuart





<a href="#" onclick="dmxAdvLayerPopup('A','DetailA.asp?MEMBER_ID=M65303','A','','OS_Look','center','center',540,550,0,true,false,false,0,'','',0,false,'','',0,false,'',1,5,true,false,'#FFFFFF');return document.MM_returnValue">more</a>

Open in new window

Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

stuamos8,

What do you mean?  The page that gets the contents (or appears when you click the link) seems to be DetailA.asp.  What does that page do?  What do you want your script to do?

If you want it to parse (or process) the contents then that is possible.  Is the page and info on your domain/server?  It looks like it is so you could use either Javascript or ASP (i.e. clientside or server side script).

If that is all you needed to know then great.  Otherwise what exactly do you need?  Sorry ... but the question and info just isn't super clear. :)

Let me know if you have any questions or need more information.  I hope that is what you wanted.

b0lsc0tt
Avatar of stuamos8
stuamos8

ASKER

Hi B0lsc0tt,

I'm after the info on the popup window that appears when you click the link.  I simply want the raw data that appears.  The info is on an external database though which isn't hosted by me.  

there's about 30,000 links so Ideally, I want a script that fetches the info automatically.

Does that make more sense?

Thanks again!
That helps.  Is the page on your site and does it have the info on it?  If the page and info is external to your server and domain then you can't use Javascript to get the info.  ASP could do it with something like ASPTear or maybe the server xmlhttp request object.  Server script can read content from other sites and servers but the browser won't let you do it with Javascript.

I hope that provides the info you want and I understood you correctly.  Let me know if you have a question or need something else for this.

bol
When you say raw data do you mean the processed output of that .asp that would normally appear after clicking the link?  If you want the source and it's on an external server then there is no way to do that, but if you just want to pull in the data off the webpage to display yourself or process in someway dynamically then you could try using an xmlhttprequest object but the easier solution is to use somekind of server side script that allows sockets and webpage fetching and have that do the parsing.

Or if you just want to display the page at that link on your page then an iframe that you update the source of may suit your needs.
Thanks b0lsc0tt and itjstagame, that's a great help.  And sorry to be so vague...

Here's an example of the kind of thing i'm trying to do:

Check out - http://74.200.213.93/RegisterMembers/SearchA.asp.  Each candidate has a ...more details link, which appears as a popup.  I want the info on that popup without having to manually grab it.

In theory, is it possible to write a script to do this (ASPtear?), and if so what would the developers main area of expertise need to be?

Kind regards,
Stuart


ASKER CERTIFIED SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Helpful, and prompt.  Very good service.
Your welcome!  I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol