I have a variable (pvlist) an array which contains data like so '120123,345654'. When I try passing only one value using window.open it works e.g when the array only has one value.
If I have more than one value in my array, I get a blank page with nothing. I have tried various solutions suggested which include:
window.open("../Functions/csv.php?refno="+pvlist);
window.open("../Functions/csv.php?refno="+pvlist+"");
window.open("../Functions/csv.php?refno="+pvlist.join(",")+"");
Any suggestion of what can be used to pass a variable with more than one comma separated value? all help appreciated.
EDIT variable pvlist is a variable with comma separated values
pvlistcontain['120123,345656']or[120123,345656]?csv.phpproblem, not javascript one. And+""part is essentially a no-op.refnoto contain a single string with all of the values? Or do you want to handle it as an array in your PHP?