Passing Array as QueryString

How is this done, and how is it "opened" on the ensuing page?

Thanks~
Bob SchneiderCo-OwnerAsked:
Who is Participating?
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
It has to be converted to name/value pairs and put in the querystring: http://www.4guysfromrolla.com/webtech/101999-1.shtml shows how to construct and decode it.
0
 
rhawkConnect With a Mentor Commented:
Off hand...
Here is a simple array.

<script type="text/javascript">
var a = new Array();
a.push(1);
a.push('apple')
a.push('4r');

document.getElementById('array').value=escape(a.toString());
</script>

Put that value into a hidden field (I called it array) and then post the form. On the other end, grab the value from request("array") and use split to convert it back to an array. The new array will be in the same order as the original.
0
 
Bob SchneiderCo-OwnerAuthor Commented:
Actually, I wrote it to a string and then broke it up into an array on the next page.
0
 
Bob SchneiderCo-OwnerAuthor Commented:
Thanks a bunch!!
0
All Courses

From novice to tech pro — start learning today.