Solved

Passing Array as QueryString

Posted on 2011-02-26
4
582 Views
Last Modified: 2012-05-11
How is this done, and how is it "opened" on the ensuing page?

Thanks~
0
Comment
Question by:Bob Schneider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 34988400
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
 
LVL 2

Assisted Solution

by:rhawk
rhawk earned 250 total points
ID: 34992939
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
 

Author Comment

by:Bob Schneider
ID: 34994048
Actually, I wrote it to a string and then broke it up into an array on the next page.
0
 

Author Closing Comment

by:Bob Schneider
ID: 34994051
Thanks a bunch!!
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question