Reputation: 3424
UPDATE:
Sorry I mean to say how may i use JS arrays with ajax?
Upvotes: 1
Views: 97
Reputation: 481
Arrays in javascript are very easy to use. To set up an array, simply set up the array like this.
var myArray = new Array();
myArray[0]="one value";
myArray[1]="two value";
myArray[2]="three value"; //etc
You don't need AJAX to store data from a text box, as the DOM can grab the contents of a text box without any ajax calls.
In jQuery, you can get the contents of a text box like this $("#idofyourtextbox").val();
Reference: How do I get the value of a textbox using jQuery?
Upvotes: 1