Text into my HTML dynamically

davearia

Centurion
Joined
Jan 4, 2005
Messages
184
Hi All,

How can I put text into my HTML dynamically? What I am trying to avoid is having created a generic/dynamic ASP.NET then put my text in the HTML.

I would rather let the user select a page from the menu and based on that do a call to the database which would bring the text back. I can manage this part no problems, what I am finding difficulty with is what to do with text I bring back. Say if my result from the database is stored in a string called myText which holds the text along with any formatting tags etc. How would I use this string to render this text into my HTML along with all the formatting?

Please help.

Thank, Dave. :D :D :D
 
this might give you some ideas
PHP:
<HTML>
 
<SCRIPT>
function setSpan(s)
{
   document.all.dynSpan.innerHTML = s;
}
</SCRIPT>
 
<BODY>
<TEXTAREA ID="theHTML" COLS="75" ROWS="10"></TEXTAREA>
<BR>
<BUTTON onclick="setSpan(document.all.theHTML.value);">Render</BUTTON>
<BR>
<SPAN ID="dynSpan"></SPAN> 
</body>
</BUTTON>
</BODY>
</HTML>
 
Back
Top