0

Hello I need to pass an array of client side events to the next page. Here my user would perform a few events which would be stored in a javascript array, upon completion a submit button would be used to post all that data to the next page.

An example of such a process is listed below, could anyone help me returning that array back to php so that I can post it to the next page. I am trying to populate different entries made into textbox into the array arr. And when I would click the submit button, I want to post that array.

<html>
<head>
<script type='text/javascript'>

function retText(form)
{
var x = form.txtBox.value;
var arr = new Array();
arr[arr.length]= x;
return arr;
}

</script>
</head>
<body>
<form name='form' method='post' action=''>
<input type='text' name='txtBox' />
<input type='button' name='click' value='clickme' onclick='retText(this.form)' />
<input type='submit' name='submit' value='submit' />
</form>
</body>
</html>

I want to return that arr back and on post I want to send that array to the next page.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Wraithmanilian
0

Before I answer on this one, I need to clarify something. Now, you want to enter input into the textbox, click the "clickme" button to set the array, and when you press "submit", you pass the values to the next page?

OR

Are you wanting to enter values into the textbox, one at a time, and when you're done you click on the submit button.

Sorry about my confusion. Working on a chat daemon in php right now, and my head is on sideways. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.