Using ASP to access Javascript script results

Discussion in 'ASP General' started by noah.coffey@gmail.com, Oct 11, 2004.

  1. Guest

    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!
     
    , Oct 11, 2004
    #1
    1. Advertising

  2. Mark Schupp Guest

    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.

    --
    Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com


    <> wrote in message
    news:...
    > 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!
    >
     
    Mark Schupp, Oct 11, 2004
    #2
    1. Advertising

  3. Insomniak29 Guest

    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.
     
    Insomniak29, Oct 13, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Monique Y. Mudama
    Replies:
    1
    Views:
    472
    Monique Y. Mudama
    Jun 28, 2005
  2. lovecreatesbeauty
    Replies:
    8
    Views:
    1,723
    Old Wolf
    Sep 12, 2005
  3. =?Utf-8?B?TGVvbkc=?=
    Replies:
    0
    Views:
    407
    =?Utf-8?B?TGVvbkc=?=
    Mar 6, 2007
  4. Ken Fine
    Replies:
    3
    Views:
    561
    Steven Cheng [MSFT]
    Jul 23, 2008
  5. david liu
    Replies:
    0
    Views:
    158
    david liu
    Jul 17, 2003
Loading...

Share This Page