lbeham
asked on
Hide text and checkbox using Javascript
I would like to hide this whole section - check box and text on the page. This code is part of a content management system so I can't just remove or comment out the code. I have to use Javascript to hide it.
</TR>
<tr id="PC684_trAnonymous">
<td class="BBFieldCaption DonationFieldCaption">Anon ymous:</td >
<TD colspan="2">
<span class="BBFieldCheckboxCapt ion DonationFieldCheckboxCapti on"><input id="PC684_chkAnonymous" type="checkbox" name="PC684:chkAnonymous" /><label for="PC684_chkAnonymous">I prefer to make this donation anonymously</label></span> </TD>
</tr>
</TR>
<tr id="PC684_trAnonymous">
<td class="BBFieldCaption DonationFieldCaption">Anon
<TD colspan="2">
<span class="BBFieldCheckboxCapt
</tr>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Good catch Walkerke. For some reason I mix those up occasionally, even when I double check. :)
bol
bol
I recommend you use display: none and not use visibility. Visibility can have mixed support in browsers and would effect the layout of the page, which I don't think you want in this case.
bol
bol
ASKER
I tried both scripts and neither one removed the text or check box. It is a content management system. I am adding the script to the html portion of a formatted text and image part. I've tried putting it a the top, then at the bottom of the page. It is currently still displaying.
put <div> tags around this section like this:
<div style="display:none;">
stuff to hid here
</div>
<div style="display:none;">
stuff to hid here
</div>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you do use Jasonsbytes' suggestion of the div tags then I would recommend not including the tr and td tags. Put that information, which is hidden anyways, outside of the table, if possible.
bol
bol
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the grade, the points and the fun question. I'm glad I could help.
bol
bol
display: none;
or
visibility: hidden;