Just Another iPhone Blog:: be able to get your voicemail - although I presume you can still dial in for it of the amazing (in its scope and workmanship) VistaPerfection theme. http://justanotheriphoneblog.com/wordpress/HOME | Dear All,
I have this code
//get whats in the layout and ajax it to db
var center = Ext.getCmp('center');
var db = ;
//go through the columns to get the items inside
Ext.each(center.items.items, function(Node, Index, AllItems){var el = Ext.getCmp(Node.id); ISSUE #25 -June 20, 2001 - SPAG:: potential as a Work of Art, but does gives scope for a lot of knowing in-jokes. And, gee, its another dystopia. And not the best one I must add. http://www.sparkynet.com/spag/backissues/spag25.htmlHOME |
Ext.each(el.items.items, addDbs);
});
//make an array of the items found and in what column
function addDbs(Node, Index, AllItems) 05-0754 Morales v. Liberty Mutual Ins. co.:: by filing two lawsuits, this one in El Paso County and another in Travis County. course and scope of employment as an example of an issue that regards http://www.supreme.courts.state.tx.us/historical/2007/dec/050754.htmHOME |
{var dbvals = db.push(this.el.id+'-'+Node.id);
return dbvals;}
//encode the array into JSON
var encoded = Ext.encode(dbvals);
//send it to the db
Ext.Ajax.request({
url: 'set_widgets.php',
params: {vals: encoded},
scope: this
});
This throws an error of dbvals is not defined, how to I get at the value of dbvals in the addDbs function?
Thanks in advance,
George
Read the doc for Ext.each - the 3rd arg is the scope.
Thanks for getting back,
I did see that, so would I use 'this', and also, is that on the nested each and not the outer one?
George
Thanks for that,
I declared the variable outside the function, and its sorted, thanks
George
Not sure what you're referring to by the nested each. Also, you're declaring dbvals as a local var to the addDbs fn, which means it re-inited for each item passed in - is that what you want? If so, why even assign a var there?
Challenging Books For A 14 Year Old?
First guitar : acoustic or electric?
|