Board Logo

Save/Restore tree states: Javascript Error!! Pls Help
fornic - 7/8/2004 at 09:05 AM

Hi

I keep getting the error:

"
Line: 116
Char: 10
Error: 'undefined' is null or not an object
Code: 0
"

The attachment is the tree i'm trying to represent together with the script which i tweeked to satisfy my needs!

Can please pinpoint the error for me and why its doing so!

Thanks

Regards
Nick


rock - 7/8/2004 at 09:50 AM

Without touching 'cookie_arr' format, I'd check its values before use those as indexes:
if(cookie_arr[x]) {
var o_item = this.a_index[cookie_arr[x]];
o_item.open(o_item.b_opened);
}

BTW: Quite good solution to save tree states.


fornic - 7/8/2004 at 09:59 AM

Thanks then! i'll try it out and post the outcome!

Cheers!
Nick


fornic - 7/8/2004 at 10:03 AM

Now its a different error: its stating:

Line: 125
Char: 7
Error: 'style' is null or not an object


What's happening...now i'm getting extrmely lost! hehe

Nick


rock - 7/8/2004 at 10:12 AM

This may happen because script trying to open non-rendered items. I.e. if parent is never opened, and you try to call open method of its child an error occurs. You need to open all parents of the item or skip it utnil parent will be opened and then open the item.


fornic - 7/8/2004 at 10:21 AM

And how may solve this! i can't delve more into the code...not much time !

Thanks for your great help!

Nick


rock - 7/8/2004 at 10:27 AM

PRO version of the Tigra Tree Menu could help to save your time and efforts.


fornic - 7/8/2004 at 11:37 AM

yes but my boss doesn't want to pay for scripts so!!!...well u get the point!

Thanks very much!
Nik


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/