On Jan 5, 1:55 pm, Jorge Godoy <[EMAIL PROTECTED]> wrote:


      var hideMyScript = function (element_id) {
          element = $(element_id);
          previous_sibling = element.previousSibling;
          updateNodeAttributes(element, {'class':'invisible'});
          updateNodeAttributes(previous_sibling, {'class':'invisible'});
      }

:-)  I haven't tested, but this might work...


Nope.  previousSibling returns something of type text.  However, this
hides the whole row of the TableForm by setting the <tr>'s class to
invisible, which is just what I want:


function setFieldVisibility(element_id, action) {
   element = $(element_id);
   this_row = element.parentNode.parentNode;
   if (action == 'hide') {
       updateNodeAttributes(this_row, {'class':'invisible'});}
   else {
       updateNodeAttributes(this_row, {'class':'visible'});}
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to