faqts : Computers : Internet : Web : CSS

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 7 people (43%) answered Yes
Recently 3 of 7 people (43%) answered Yes

Entry

How do I display dynamic text without a text box?

Jan 30th, 2003 04:01
Klaus Bolwin, Navina Chhabria,


It seems not to be a CSS question?
There are a lot of possibilities to do that:
1. toggle between display the text and not display the text:
if (elementreference.style.display == "none")
elementreference.style.display = "block";
else
elementreference.style.display = "none"
instet of 'block', you can use 'inline'.
2. to change the content of a text node:
for Mozilla:
elementreference.firstChild.nodeValue = "new text";
and for MSIE
elementreference.innerText = "new text";