changing text with Javascript/DHTML?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Ryan

    changing text with Javascript/DHTML?

    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?
  • kaeli

    #2
    Re: changing text with Javascript/DHTML?

    In article <73a63a2f.04071 61142.7f7ce51c@ posting.google. com>, cryan3
    @earthlink.net enlightened us with...[color=blue]
    > 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?
    >[/color]

    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>

    --
    --
    ~kaeli~
    No one is listening until you make a mistake.



    Comment

    • Grant Wagner

      #3
      Re: changing text with Javascript/DHTML?

      Chris Ryan wrote:
      [color=blue]
      > 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?[/color]

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

      --
      Grant Wagner <gwagner@agrico reunited.com>
      comp.lang.javas cript FAQ - http://jibbering.com/faq


      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: changing text with Javascript/DHTML?

        Chris Ryan wrote:[color=blue]
        > 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. [...]
        > There's gotta be a way to do this, right?[/color]

        There is. And if you would have cared to use the tool that you are
        using for posting also for (re)search, you would not have had to ask.


        PointedEars

        Comment

        Working...