Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post get URL function?

    hi,

    Can anyone help... I need to get javascript to request a url that then returns a string by calling an ASP script ....

    What I need to know, is can javascript do this, and "capture" the results to a string variable, that I can then interpret and take whatever action.

    I need it to happen without having to put anything out to the current web page - is this possible...?

    It needs to be able to call the server "in the background" of the page, and process results returned ... perhaps with a timer, and then take appropriate action based on the return results.

    Is javascript this advanced? (I could always use a hidden frame that refreshes itself to make sure that my ASP script is called, perhaps).

    Hope I haven't confused you all!! ;-)

    Thanks in Advance for any help
    Alan

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Something like this?

    Code:
    <script type="text/javascript">
    <!--
    document.write("<img src=\"something.asp?URL="+window.location+"\" width=\"1\" height=\"1\" />")
    // -->
    </script>
    Last edited by whammy; 01-19-2003 at 05:26 PM.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #4
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, this is what I need ... in psuedo-code:

    var str = getURL("something.asp");

    so str would be populated with what-ever gets returned from something.asp (HTML or text) (similar to typing the URL in a browser window, but instaed of having the page returned, it simply populates a variable)

    then I am free to process the contents of str as I please:

    eg. if str="help" then document.write "click here for help..."

  • #5
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    remote scripting - that sounds like what I need!!

    thanks mordred

    Alan


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •