I have the following. There must be something less cumbersome without push
pop. The function parameter obj is the event.srcElemen t and has the
attributes(prop erties?) picNum and alb pinned to it. The function is part of
a process to delete the selected obj, a photo in this case from the album
vis albumArr. TIA
Jimbo
function Album(albumName ) {
this.name=album Name;
this.paths=new Array();
}
var albumArr(); // holds an array of Albums();
function removeArrSrc(ob j) {
var dummy=new Array();
for(i=0;i<album Arr.length;i++) {
dummy[i]=new Album(albumArr[i].name);
var el=albumArr[i].paths;
for(var j=0;j<el.length ;j++) {
if(dummy[i].name==obj.alb) {
if(j==obj.picNu m) continue;
}
var len=dummy[i].paths.length;
dummy[i].paths[len]=el[j];
}
}
albumArr=dummy;
}
pop. The function parameter obj is the event.srcElemen t and has the
attributes(prop erties?) picNum and alb pinned to it. The function is part of
a process to delete the selected obj, a photo in this case from the album
vis albumArr. TIA
Jimbo
function Album(albumName ) {
this.name=album Name;
this.paths=new Array();
}
var albumArr(); // holds an array of Albums();
function removeArrSrc(ob j) {
var dummy=new Array();
for(i=0;i<album Arr.length;i++) {
dummy[i]=new Album(albumArr[i].name);
var el=albumArr[i].paths;
for(var j=0;j<el.length ;j++) {
if(dummy[i].name==obj.alb) {
if(j==obj.picNu m) continue;
}
var len=dummy[i].paths.length;
dummy[i].paths[len]=el[j];
}
}
albumArr=dummy;
}
Comment