i am capturing the value of changed fields via JS Event and capturing that data into temp1 array, say, if u change field name "name", then it will get the field name "id" and will store it into temp1. but the main problem is how can i pass this array to a php form processing page, where i can get the value of this temp1.
i tried using JSON but it's not helping me out.
the code which i tried was: $.post('/somepage.php', temp1); but it didnt work.
please help me out with this.
and i included jquery.js lib in the page.
<script type="text/javascript">
var temp1 = new Array();
function onChangeTest(changeVal)
{
//alert("Field u changed was: " + changeVal.id)
temp1.push(changeVal.id);
tmsg = "Fields u changed so far are:"
for(var i=0;i<temp1.length;i++)
{
//document.write("<b>temp1["+i+"] is </b>=>"+temp1[i]+"<br>");
tmsg = tmsg + " " + temp1[i];
}
alert(tmsg);
}
//$.post('/somepage.php', temp1);
</script>
var_dump($_REQUEST);in somepage.php output when you run the script and check the response with Firebug?