homerUK
06-10-2004, 03:40 PM
This is driving me maaaaaaad and I dont know why it's not working!!
I set up an array when the page loads eg:
backup = new Array();
backup[0] = "testing";
then I have a function called undo() which tries to add a value to the array... only it cant be accessed. When I test the length of backup, it says it's ZERO... when you can clearly see I've put an item in it above!!
how come I cant access it? My functions are in an included .JS file maybe that's why?!
BTW: this is a modified version of axinya's undo-redo function which seems to work perfectly!! (http://www.codingforums.com/showthread.php?t=39987)
I set up an array when the page loads eg:
backup = new Array();
backup[0] = "testing";
then I have a function called undo() which tries to add a value to the array... only it cant be accessed. When I test the length of backup, it says it's ZERO... when you can clearly see I've put an item in it above!!
how come I cant access it? My functions are in an included .JS file maybe that's why?!
BTW: this is a modified version of axinya's undo-redo function which seems to work perfectly!! (http://www.codingforums.com/showthread.php?t=39987)