I am trying to post URL results with collected data (the this.itemOne ....) by iterating using $.post , $.each to gather the data, i need to capture this data append it together (the URL + data) and post some result. I am fairly new at this so any help would be appreciated. Thanks!

oh, also based on the code below my .this object returns undefined. I need to correct that.




var Alpha = function() {
this.itemOne = 1;
this.itemTwo = 2;

this.doSomething = function(withThis) {
$.post("/post/url", { data: withThis },
function(result) {
this.itemOne = result.resultOne;
this.itemTwo = result.resultTwo;
});
};
this.doSomethingElse = function(withThese) {
for (var i = 0; i < Things.length; i++) {
$.each(Things[i].subItems, function(subItem) {
};
};
$.post("/post/url2", { data: withThese.postData},this.postResponse);
};
};

Alpha.prototype.postResponse = function(data) {
this.doSomething(data);
};