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
needhelpneedhelp 

How to create dynamic table at VF page

I try to generate HTML code in a controller and pass back to VF page to display. But,I can't think of a way to

display the HTML code correctly.

 

At my VF page, 

  1. By using <script>document.write({!HTML})</script>  --> the HTML code able to display as a table. But, this way is not working fine at IE7.
  2. By using <apex:outputText value="{!HTML}"></apex:outputText> --> this purely display the HTML code as text, not a table.
  3. Combine 1 & 2, <script>document.write()</script><apex:outputText value="{!HTML}"></apex:outputText> --> This way is working fine at IE7 and firefox, but this way looks a bit weird. Why with the <script> tag, the <apex:outputText> able to display HTML code correctly?

Kindly advise on this problem.

 

or is there any other idea on how to create a dynamic table at VF page based on the data being retrieve?

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
needhelpneedhelp

found the solution at this post:

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=14700

 

use escape = false for <apex:outputText> :)