Thanks for the suggestion, Jason. Most people don't run into this problem 
because they do not deal with dynamically assigned div ids from javascript 
variables. I found for what i am doing it was the most efficient way to go 
about referencing the divs. otherwise, switch statements with 33 cases 
would have to do, and that was pretty intensive.

It does appear that the $(element) wrapper doesn't play nice at all with 
javascript variables, you actually have to put the quotes exactly as they 
appear on the div. (unless I am still doing it wrong).. i tried .toString 
functions, parseInt's, double quotes, single quotes, with and without the 
$wrapers, etc.. and finally I looked into the prototype.js script and the 
visible method is really simple, just checks if the display: property of 
the style attribute is set to none and returns a boolean value, so the 
workaround is to get the element with the document.getElementbyID (which*does 
*work fine with javasscript variable as the ID), and do the conditional 
statement custom. In the process of researching this bug I made a series of 
alternative functions as a different way to skin the cat. Currently they 
keep track of which systems are closed, minimized or unopen with some 
innerHTML in a hidden div that references the index (100-133) with the 
letter U, M or O, then rewrites the entire string when it changes.
the initial div looks like this: (all systems unopened):

<div id="mb_system_state_references" 
style="display:none;">100=U:101=U:102=U:103=U:104=U:105=U:106=U:107=U:108=U:109=U:110=U:111=U:112=U:113=U:114=U:115=U:116=U:117=U:118=U:119=U:120=U:121=U:122=U:123=U:124=U:125=U:126=U:127=U:128=U:129=U:130=U:131=U:132=U</div>


I have got half of the functions working, you can see what I am working on 
here: http://monkeypanel.com/demo

-- 
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/-/OHJUzayk4UAJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to