Solved

Passing Array as QueryString

Posted on 2011-02-26
4
579 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
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

789 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