Hi. I'm using prototype to do some ajax requests and using this function to pass the value of a slider
Code:
function setPeriod(v) {
	alert(v);
	new Ajax.Request('inc/updateperiod.app.php',
  {
    method:'get',
	parameters: {period: v},
    onSuccess: function(v){
      alert("Period set to "+v+" (days)");
    },
    onFailure: function(){ alert("Unable to update \'config.ini\'") }
  });
}
If I run
Code:
setPeriod(14)
the first alert shows (correctly) 14, however the second shows
Code:
Period set to [object Object] (days)
Am I overlooking something really simple?