Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Passing Array as QueryString

Posted on 2011-02-26
4
Medium Priority
?
585 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 84

Accepted Solution

by:
Dave Baldwin earned 1000 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 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

879 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