J
J. J. Cale
I have the following. There must be something less cumbersome without push
pop. The function parameter obj is the event.srcElement and has the
attributes(properties?) 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=albumName;
this.paths=new Array();
}
var albumArr(); // holds an array of Albums();
function removeArrSrc(obj) {
var dummy=new Array();
for(i=0;i<albumArr.length;i++) {
dummy=new Album(albumArr.name);
var el=albumArr.paths;
for(var j=0;j<el.length;j++) {
if(dummy.name==obj.alb) {
if(j==obj.picNum) continue;
}
var len=dummy.paths.length;
dummy.paths[len]=el[j];
}
}
albumArr=dummy;
}
pop. The function parameter obj is the event.srcElement and has the
attributes(properties?) 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=albumName;
this.paths=new Array();
}
var albumArr(); // holds an array of Albums();
function removeArrSrc(obj) {
var dummy=new Array();
for(i=0;i<albumArr.length;i++) {
dummy=new Album(albumArr.name);
var el=albumArr.paths;
for(var j=0;j<el.length;j++) {
if(dummy.name==obj.alb) {
if(j==obj.picNum) continue;
}
var len=dummy.paths.length;
dummy.paths[len]=el[j];
}
}
albumArr=dummy;
}