Using ASP to access Javascript script results

N

noah.coffey

Hello,

I'm wanting to do something and I'm not sure if it's possible (I'd sure
like it to be).

I'm using a neat service called FeedSweep to aggregate a large list of
XML/RSS/ATOM feeds. The FeedSweep works just fine, it takes my request,
chugs and kicks out what it should. The problem is that because I'm
throwing 40 some feeds at it, it takes anywhere from 30 seconds to a
minute+ to kick back the "content." What I want to do (to save my users
from having to wait that time and to keep me from constantly swamping
the FeedSweep servers with these requests) is to use the XMLHTTP
component in ASP to grab the results, save them to a file on my server,
and pull from it (updating once or twice a day).

The problem I'm having is this... FeedSweep generates a Javascript code
for me to place in my webpage, and this code executes and returns the
results (what I want). But, when I try to grab the webpage that
contains this javascript code (link), all I get returned to me is the
"-script src=*link generated from feedsweep*- -/script-" -- What I want
is the actual result content that is generated. (replace the "-" with
greater than/less than signs)

I don't care if I get the actual content of the script or what the
script generates, I just need more than just the script src tag.

Here is an example:

http://www.blogindiana.com/BlogFeeds/BlogFeed.asp

If you open that in your browser, it will take a minute, but it will
eventually display what I want. I want to somehow grab that content and
throw it in a file on my server. Is there any way to do that--grab the
result of a javascript execution, and NOT the javascript itself?
Hopefully this is clear. I'd greatly appreciate any help!! Thanks!
 
M

Mark Schupp

I get no response on your example page.

However, unless the JavaScript code that it returns is regular enough that
you can parse it to extract the data you will need a browser engine to
render it. I don't think that IE is designed in such a way that you can
safely do this from an ASP page. You might be able to do something with VB
and the IE web-browser control and then run it as a batch process when you
want to update the data.
 
I

Insomniak29

I think I understand what you are saying.

But, take a more simple example. Just a page with a javascript
reference that runs and has "document.write('hello world');" as it's
output (which prints directly to the screen).

I want to use ASP to access the results (ie. either the
"document.write" line of code, or the result of that code, the "hello
world" text alone). All I seem to get is the javascript tag that has an
SRC= pointing to an ASP.NET script that generates and returns
javascript.

If the javascript was scripted out in the page code, there wouldn't be
an issue. Instead, the code is being called from a remote file, which
is why I am having trouble accessing it.

If I try and directly grab the .aspx file that the script tag is
linking to, it just times out (even though if I type the same exact URL
into my browser and hit enter, it will display the actual javascript
used to generate the content).

Am I just confusing this issue more? Are the results of a remotely
called javascript file (not inline code) accessable via an ASP XMLHTTP
request? Is there any other way to get at this content?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top