View Full Version : How to call ASp function inside Java script
priya2303
18-07-2003, 00:04/12:04AM
Hi All,
In one of my java script function , I need to get a value from a asp user definded function. Can any our friend provide me the details to do this. your help is much appreciated.
Regards
Priya
polarmate
18-07-2003, 00:42/12:42AM
:hi: Priya! Welcome to the forums
<script type="text/javascript">
nJSVariable = <%=nASPVariable%>
</script>
where nJSVariable is your javascript variable and nASPVariable is the result from your ASP function
Your ASP function is executed on the server side and when the HTML is generated the variable nASPVariable has a value. This value is written to the HTML page and if you do a View Source of the page, the above code will look like
<script type="text/javascript">
nJSVariable = -1 'assuming that nASPVariable has value -1
</script>
HTH!
vBulletin® v3.8.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.