function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ryanhcaryanhca 

Hiding HTML elements based on criteria -- without outputText

I have an HTML table that displays data, but it's not a dataTable. I would like to figure out a way to show or hide individual rows if the data for that row is missing (or some other criteria).

 

For something other than a table row, I would use a outputText tag with a rendered attribute that determines if the element will be shown. But an outputText tag puts a SPAN tag around the text inside the outputText tag, which isn't valid inside a table. 

 

Ideas? 

Best Answer chosen by Admin (Salesforce Developers) 
XactiumBenXactiumBen

Try using this:

 

<tr style="display: {!IF(myVariable == true, 'block', 'none')};">