javascript calling asp function

Discussion in 'ASP General' started by Sehboo, Oct 13, 2005.

  1. Sehboo

    Sehboo Guest

    How can I call asp function from javascript?
    Sehboo, Oct 13, 2005
    #1
    1. Advertising

  2. Sehboo wrote:
    > How can I call asp function from javascript?


    "javascript"? I assume you mean "client-side code", which can be written in
    other script languages besides javascript, depending on browser support ...
    Since this is a client-side question, it's offtopic for this newsgroup. You
    should post any followup questions to an appropriate group such as
    ..scripting.jscript.

    Anyways, the answer is:
    By requesting the page containing the function from the server.

    There are several techniques via which this can be accomplished: img
    elements, iframes, remote scripting, xmlhttprequest. The technique you use
    depends on whether you need to receive a value back from the server-side
    function.

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Oct 13, 2005
    #2
    1. Advertising

  3. Sehboo

    Bullschmidt Guest

    Don't know if this might give you any ideas.

    JavaScript function with an ASP variable.
    Response.Write "<script type='text/javascript'>alert('" &
    strMyASPVariable & "');</script>"

    JavaScript function with hardcoded text:
    Response.Write "<script type='text/javascript'>alert('Yet to be
    developed.');</script>"

    Best regards,
    J. Paul Schmidt, Freelance Web and Database Developer
    http://www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

    *** Sent via Developersdex http://www.developersdex.com ***
    Bullschmidt, Oct 17, 2005
    #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. szabelin
    Replies:
    6
    Views:
    14,143
    szabelin
    Aug 16, 2003
  2. Anatoly
    Replies:
    1
    Views:
    8,980
    =?Utf-8?B?TmlsZXNodw==?=
    Feb 17, 2004
  3. =?Utf-8?B?S0s=?=
    Replies:
    6
    Views:
    31,760
    errorocean
    Mar 22, 2010
  4. Andreas Lagemann
    Replies:
    8
    Views:
    452
    Mike Wahler
    Jan 10, 2005
  5. tiwy
    Replies:
    0
    Views:
    423
Loading...

Share This Page