Wrox Home  
Search P2P Archive for: Go

  Return to Index  

interdev_programming thread: Javascript Array to Session Array


Message #1 by anshul.bhatia@s... on Mon, 19 Feb 2001 13:07:49
I think I get what your trying to do.

First off, JavaScript doesn't give you access to the session object.

Assuming that this javascript array will be sent to the server in a form, I
think your best approach is this:
-Put in a hidden form element (to contain the "array")
-Before you submit the form, take the JavaScript array and make it into a
string with a delimiter (1,2,3,4) using a simple JS loop construct
-Then, the script that processes this form can use a split() function on the
string to create an array from the delimited string, which you can then put
into a session variable.

HTH

Peter L

-----Original Message-----
From: anshul.bhatia@s... [mailto:anshul.bhatia@s...]
Sent: Monday, February 19, 2001 8:08 AM
To: Interdev_Programming
Subject: Javascript Array to Session Array


I want to store the array constructed in Javascript in session Arrays. How
to do it in Javascript ???

Any help ?

regards
Anshul


  Return to Index