whoa i had no idea you could do that with javascript array. i just didn't 
think the data persistence was possible, even if the window was still open. 
but it makes perfect sense, and much simpler than what i'm doing now. I 
will have to give it a shot tomorrow, thank you!

On Monday, October 15, 2012 2:15:23 PM UTC-4, Peter Sysko wrote:
>
> I love prototype and scriptacualous. I don't combine with jquery so i know 
> i am not having a noclonflict headache,
> and I am just trying to get the visible() function (
> http://prototypejs.org/api/element/visible)
> to not throw null type error exceptions: here is the function I need to 
> fix, syntactically:
> the function creates an associative array to track which of 33 system 
> panels are either open, unopen, or minimized*:
> **(the systems are indexed from 100 to 132)*>>
>
> function get_system_states() { 
>     var k=0; var sys_array = new Array(); var open_div=''; var min_div='';
>     for(k=100;k<132;k++){
>         open_div = 'system'+k+'';
>         min_div = open_div+'_minimized';
>         if ($(open_div).visible()==true) {
>         sys_array[k] = "o"; // o = open
>         } 
>         if ($(min_div).visible()==true) {
>         sys_array[k] = "m"; // m = minimized
>         }
>         if (($(open_div).visible()==false)&&($(min_div).visible()==false)) 
> {
>         sys_array[k] = "c";    // u = unopen
>         }
>     }
> return sys_array;
> }
>
> Javscript console error says : 
>
>    1. Uncaught TypeError: Cannot call method 'visible' of null
>       1. 
>       
>    
> the first IF statement in the for loop is throwing the exception, but I 
> assume I am not assigning the div values correctly?
> i have found no answers in this group from a text search and from a 
> general google search. 
> is this a single quotation reference? my div id's are dynamically written 
> in php codeignite, which shouldnt really matter.
>
> any suggestions for how to properly get the visibility of each div in each 
> current state?
> thanks!!
> -pete
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/dodF3TNhKR0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to