www.webdeveloper.com
Results 1 to 2 of 2

Thread: show/hide table rows in IE and Firefox

  1. #1
    Join Date
    Feb 2009
    Posts
    1

    show/hide table rows in IE and Firefox

    worked up this bit and hope it might help someone down the line.

    function hideDiv(elementName)
    {
    for(i=1;i<=13;i=i+1)
    {
    var formField = elementName+i;
    valuated = eval(document.getElementById(formField).style.display == "none");
    if(valuated == false)
    lastDisplay = i;
    }
    document.getElementById(elementName+lastDisplay).style.display='none';
    }
    function showDiv(elementName)
    {
    for(i=1;i<=13;i=i+1)
    {
    var formField = elementName+i;
    valuated = eval(document.getElementById(formField).style.display == "none");
    if(valuated == false)
    lastDisplay = i+1;
    }
    if(navigator.appName == 'Microsoft Internet Explorer')
    document.getElementById(elementName+lastDisplay).style.display='block';
    else
    document.getElementById(elementName+lastDisplay).style.display='table-row';
    }


    Thanks!

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Can we see the complete page? We need to see that HTML table as well

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles