Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: How to set session variable in jscript


Message #1 by "George Tataryn" <gathome@s...> on Sun, 21 Jul 2002 00:17:15
This is a multi-part message in MIME format.

------=_NextPart_000_0031_01C230A4.10E04C20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

u cannot set session variables in jscript for the simple reason that 
jscript is client side and sessions run on the server side scripts.

regards
bharat saboo
----- Original Message -----
From: George Tataryn
To: JavaScript HowTo
Sent: Sunday, July 21, 2002 12:17 AM
Subject: [javascript_howto] How to set session variable in jscript



I'm retrieving input from a user, from a prompt box,
i need to set the return string to a session variable so i can retrieve
after, the code i have doesn't seem to work, do i have the syntax wrong,
any ideas ???

<BODY onload=3D"Init();" bgcolor=3D"#9999FF">
<SCRIPT LANGUAGE=3D"JavaScript">
<!--
var cid ;

  cid =3D newPrompt(
     'Enter Client ID',
     'Please Enter CLIENTID',
     'CLIENTID');

document.write(cid+"<BR>");//test for string

<%Session("cid")=3D cid%>;

 //-->
</SCRIPT>

<%response.write(Session("cid"))%>

Thanks

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20




  Return to Index