Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   javascript calling asp function (http://www.velocityreviews.com/forums/t799812-javascript-calling-asp-function.html)

Sehboo 10-13-2005 07:20 PM

javascript calling asp function
 
How can I call asp function from javascript?


Bob Barrows [MVP] 10-13-2005 07:39 PM

Re: javascript calling asp function
 
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.



Bullschmidt 10-17-2005 02:40 AM

Re: javascript calling asp function
 
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 ***


All times are GMT. The time now is 09:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57