[thelist] [javascript] Anyway to dynamically change the text onscreen? - New question

Martin E espmartin at hotmail.com
Sun Feb 1 22:24:59 CST 2004


Hello Tom,

How cross-browser compatible is the innerHTML function? And is it 6+ browser version only?

Martin E.
  ----- Original Message ----- 
  From: Tom Dell'Aringa 
  To: thelist at lists.evolt.org 
  Sent: Saturday, January 31, 2004 4:48 PM
  Subject: Re: [thelist] [javascript] Anyway to dynamically change the text onscreen?


  --- Chris Johnston <chris at fuzzylizard.com> wrote:
  > Another hopefully quick and easy JavaScript question.
  > 
  > I have to create a slide show type script. This slide show involves
  > changing both the image and the text around the image. I know that
  > if I 
  > place text in textfields I can use javascript to change the text.
  > What I 
  > am wondering is if I place text in a unique div, if I can use
  > javascript  to change the text in that?

  innerHTML is your friend.

  document.getElementById('yourDiv').innerHTML = "some new text here";

  Tom

  =====
  http://www.pixelmech.com/ :: Web Development Services
  http://www.DMXzone.com/ :: JavaScript Author / Every Friday!
  http://www.thywordistruth.net/ :: Eternal Life

  [Those who say that I am finished, and am through, will have to run over my dead body to beat me...]


More information about the thelist mailing list