changing text with Javascript/DHTML?

C

Chris Ryan

Is there a way to change the displayed text on a web page using some
combination of Javascript and DHTML? NOT in a text box. As far as I
know (with my limited knowledge) the only way you can do this is with
a textbox or images, which is not what I'd like to do. There's gotta
be a way to do this, right?
 
K

kaeli

cryan3 said:
Is there a way to change the displayed text on a web page using some
combination of Javascript and DHTML? NOT in a text box. As far as I
know (with my limited knowledge) the only way you can do this is with
a textbox or images, which is not what I'd like to do. There's gotta
be a way to do this, right?

Sure, if you're targeting recent DOM browsers. Put it in a div and use
DOM methods and/or change innerHTML (I prefer DOM methods to just
changin innerHTML).

Can't do it in older browsers very well, but even NN4 could change the
content of a layer.

Netscape/Mozilla:
<http://www.mozilla.org/docs/dom/domref/dom_el_ref.html#1021544>
MSIE:
<http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/dhtml_reference_entry.asp>

--
 
G

Grant Wagner

Chris said:
Is there a way to change the displayed text on a web page using some
combination of Javascript and DHTML? NOT in a text box. As far as I
know (with my limited knowledge) the only way you can do this is with
a textbox or images, which is not what I'd like to do. There's gotta
be a way to do this, right?

<url: http://jibbering.com/faq/#FAQ4_15 />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top