I needed to loop through a bunch of form fields in javascript, serialize them into a string, and then pass them to a PHP script for further manipulation. Here’s an easy way to loop through form fields that I found on the google:
for(i=0; iHere's what my code ended up looking like:
var strArr = ""; for(i=0; i(<)document.posfrm.elements.length; i++) { strArr += document.posfrm.elements[i].name + '*' + document.posfrm.elements[i].value + '|'; }