Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read the value of a javascript variable from server side VBScript

Status
Not open for further replies.

bangalibhai

Programmer
Oct 22, 2002
26
US
Hi,

I need some input on the following. It is possible to read in the value of a server side variable from javascript as stated below:
<HTML>
<SCRIPT language=&quot;javascript&quot;>
<%
Dim anynum
anynum = 100
%>
alert (&quot;<%=anynum%>&quot;);
</script>
<%
Response.Write anynum
%>
</HTML>

Is it possible to do just the opposite? Read the value of a javascript variable from server side VBScript by doing the following?

<HTML>
<SCRIPT language=&quot;javascript&quot;>
var anynum2=100;
<%
Dim anynum
anynum = anynum2 'THIS DOES NOT WORK
%>
alert (&quot;<%=anynum%>&quot;); //this is blank
</script>
<%
Response.Write anynum
%>
</HTML>
 
try
thread333-531461



_________________________________________________________
for the best results to your questions: FAQ333-2924
[sub]01001111 01101110 01110000 01101110 01110100[/sub]
onpnt2.gif
[sup] [/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top