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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to use session variables in <script> tags

Status
Not open for further replies.

CyrusAyers

Programmer
Feb 4, 2004
25
0
0
US
This is pretty noob but:
I know this works:
Code:
<%session("variable1")=10%>
But this generates an error:
Code:
<SCRIPT LANGUAGE="VBScript">
session("variable1") = 10
</SCRIPT>
What about javascript, etc?
Thanks for your time,
Cyrus
 
sessions are assigned and created server-side so your first example works.

Your second example is for a client side script as would be javascript.



Chris.

Indifference will be the downfall of mankind, but who cares?
 
Good point, but can a client side script "affect" session variables? Can it even see them? Is there a better way? Using hidden fields to communicate values is a bit tedious.

Cyrus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top