SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Threaded View

  1. #1
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    0 Post(s)
    0 Thread(s)

    <br> in DHTML text replacement?

    Figured this section was as close to DHTML as it gets here, so...

    I'm trying to replace some text in a span (id="description1") using the following script:

    onclick="description1.innerText='Blurb One.<br><br><br>Blurb Two.';"

    The idea is to have 'Blurb One' followed by 3 linebreaks then 'Blurb Two', so Blurb Two is 3 lines lower.
    The text is being replaced, but is showing each <br> as text on one line, rather than using them as linebreaks.

    So basically I'm looking for the way to have linebreaks in this script.

    Any solutions?

    Last edited by Bill Posters; Mar 5, 2002 at 07:34.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts