To answer your OP directly (not sure if it has been, I didn't notice it).
open_div = 'system'+k+'';
...
if ($(open_div).visible()==true) {
if there is no item with id 'system'+k then $(open_div) returns null
(correctly) and so $(open_div).visible() throws an error. (for example
if nothing has "id='system123'" then when k-123 the error wiil throw)
You can avoid it with:
if ($(open_div)) {
if ($(open_div).visible()==true) {
Dave
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
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.