Title: Simple Problem, but I can't find it

Here's the code:

        <input type="HIDDEN" name="sig0" value="" id="sig0_hidden">
        <input type="CHECKBOX" name="sig0" value="Monica Tetrault, LPC" class="radiocheck" id="sig0_checked">
        <span style="">Monica Tetrault, LPC</span><br />
        <input type="HIDDEN" name="sig1" value="" id="sig1_hidden">
       
        <input type="CHECKBOX" name="sig1" value="Raphael Thigpen, Psy.D." class="radiocheck" id="sig1_checked">
       
        <span style="">Raphael Thigpen, Psy.D.</span><br />
       
        <span id="sig2_pre" style="display: none">Supervised by<br/></span>
       
        <input type="HIDDEN" name="sig2" value="" id="sig2_hidden">
        <input type="CHECKBOX" name="sig2" value="Jeff Dersh, Ph.D. - Licensed Psychologist" class="radiocheck" id="sig2_checked">

        <span style="">Jeff Dersh, Ph.D. - Licensed Psychologist</span> </div>
       
        <script language="_javascript_" type="text/_javascript_">
                Event.observe("sig1_checked", "click", function(){ chkShowItem("sig1_checked", "sig2_pre"); })
        </script>

And the code for chkShowItem:

function chkShowItem($sChk, $sID){
       
        if($sChk== true) $($sID).style.display = 'inline';
        else $($sID).style.display = 'none';

        }

The event is observed, but the $sChk.anyproperty returns undefined. How can it see the checkbox to detect the click, but not see any of it's properties. I'm sure I'm just missing something simple, but I've spent an hour and I use this procedure a bunch in my code, and it works fine everywhere else.



_____________________
Thanks,  

Keith Davis - MCSA, A+, N+
P.R.I.D.E. - Director of Computer Services
www.pridedallas.com
Work (214) 351-6600 ext. 119
Mobile (214) 906-5183


_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to