I want to make a JavaScript array and pass it to another page in php via post request I get an error in firebug:
ReferenceError: array is not defined
Here's the code:
$(document).ready(function(){
var data = new array(); // this line throws the error
// Handle Submiting form data
$("#btnSumbit").click(function (){
$('#tblCriteria input[type=text]').each(
function(){
data[this.id] = this.value;
}
);
This code inside cakePHP view.
var data = new array();in the top on script or rename data to other name.