javascript - hiding one div tag hides others -
when hide "div1title", other divs hiding. there can solve issue?
<div id="div1title" style="visibility: visible;display:inline"> <table class="htmlrtabledata" style="width:1000px"> <tr> <td style="width:20px"> <img id="div1plus" src="images/plus.jpg" width="20px" height="20px" onclick="onclicksubreport('div1', event, this)"> </td> <td id="div1titletext"></td> </tr> </table> <div> <div id="div2title" style="visibility: visible;display:inline;"> <table class="htmlrtabledata" style="width:1000px"> <tr> <td style="width:20px"> <img id="div2plus" src="images/plus.jpg" width="20px" height="20px" onclick="onclicksubreport('div2', event, this)"> </td> <td id="div2titletext"></td> </tr> </table> <div>
my js:
document.getelementbyid("div1title").style.display = "none"; document.getelementbyid("div1title").style.visibility = "hidden"
closing div tags should work. nesting second div accident.
<div id="div1title" style="visibility: visible;display:inline"> <table class="htmlrtabledata" style="width:1000px"> <tr> <td style="width:20px"> <img id="div1plus" src="images/plus.jpg" width="20px" height="20px" onclick="onclicksubreport('div1', event, this)"> </td> <td id="div1titletext"></td> </tr> </table> </div><!-- here --> <div id="div2title" style="visibility: visible;display:inline;"> <table class="htmlrtabledata" style="width:1000px"> <tr> <td style="width:20px"> <img id="div2plus" src="images/plus.jpg" width="20px" height="20px" onclick="onclicksubreport('div2', event, this)"> </td> <td id="div2titletext"></td> </tr> </table> </div>
Comments
Post a Comment