slaw_dawg
02-03-2005, 03:54 AM
Im having problems populating my data grid, and ive done just about anything i can think of , so here I am once again turning to the forums to gather your opinions. Heres my code
var lv_out = new LoadVars();
var lv_in = new LoadVars();
var lookup_name = new Object();
Characters = new Array();
var userListener = new Object();
var char = new Object();
data_grid.dataProvider = Characters;
lv_in.onLoad = function(success) {
if (success) {
Charname.autoSize = "center";
Charname.text = lv_in[name];
dyntxt.autoSize = "center";
dyntxt.text = ("Level "+lv_in["level"]+" "+lv_in["race"]+" "+lv_in["type"]);
guild_txt.autoSize = "center";
guild_txt.text = (lv_in["rank"]+" "+"of"+" "+lv_in["guild"]);
// for loop to populate array
for (i=0; i<lv_in["count"]; i++) {
char.type = lv_in["type"+i];
char.level = lv_in["level"+i];
char.name = lv_in["name"+i];
Characters[i] = char;
}
}
};
userListener.change = function(event) {
lookup_name = event.target.selectedItem.Name;
lv_out.funky = lookup_name;
lv_out.sendAndLoad("chardetails.php", lv_in, POST);
};
data_grid.addEventListener("change", userListener);
lv_out.funky = "all";
lv_out.sendAndLoad("chardetails.php", lv_in, POST);
im not worried about the dynamic text boxes, i know why they arent populating and will fix that as soon as i can get this data grid working
once again , thanks for any help you can provide.
var lv_out = new LoadVars();
var lv_in = new LoadVars();
var lookup_name = new Object();
Characters = new Array();
var userListener = new Object();
var char = new Object();
data_grid.dataProvider = Characters;
lv_in.onLoad = function(success) {
if (success) {
Charname.autoSize = "center";
Charname.text = lv_in[name];
dyntxt.autoSize = "center";
dyntxt.text = ("Level "+lv_in["level"]+" "+lv_in["race"]+" "+lv_in["type"]);
guild_txt.autoSize = "center";
guild_txt.text = (lv_in["rank"]+" "+"of"+" "+lv_in["guild"]);
// for loop to populate array
for (i=0; i<lv_in["count"]; i++) {
char.type = lv_in["type"+i];
char.level = lv_in["level"+i];
char.name = lv_in["name"+i];
Characters[i] = char;
}
}
};
userListener.change = function(event) {
lookup_name = event.target.selectedItem.Name;
lv_out.funky = lookup_name;
lv_out.sendAndLoad("chardetails.php", lv_in, POST);
};
data_grid.addEventListener("change", userListener);
lv_out.funky = "all";
lv_out.sendAndLoad("chardetails.php", lv_in, POST);
im not worried about the dynamic text boxes, i know why they arent populating and will fix that as soon as i can get this data grid working
once again , thanks for any help you can provide.