How can Server-Side variable'value be given to Client-Side variable by program

J

Jack

Hello,
<%@ Language=VBScript %>
<%
dim a
a=10
'I want b=a at this place
%>
<Script language=VBScript>
dim b
</Script>
How can a'value be given to b by program?
Thank you
 
R

Ray at

Picture it this way. If you wanted to give b the value of 10 in your
client-side code, you'd do:

<script language=vbscript>
Dim b
b=10
</script>

So, what you want is the number 10 in your response. Well, on the server,
the "a" variable has a value of 10, so you'd want to response.write the
evaluated value of the server-side variable, a.

<%
''server side code
Dim a
a = 10
%>

<script language=vbscript>
''client side code
Dim b
b=<%=a%>
</script>


Ray at home
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top