Javascript to add tags to a text area on a form?

Discussion in 'Javascript' started by katherine, Nov 12, 2003.

  1. katherine

    katherine Guest

    Does anyone know a simple Javascript to add tags to a text area on a form.

    On clicking a bold button for instance <strong></strong>

    ?

    Any help appreciated, thanks,
    kate
     
    katherine, Nov 12, 2003
    #1
    1. Advertising

  2. katherine wrote:

    > Does anyone know a simple Javascript to add tags to a text area on a form.
    > On clicking a bold button for instance <strong></strong>


    To do that, you'd use ranges, under the risk of getting malformed HTML
    in the end; we've discussed this issue with Richard some time ago, you
    might find the following thread useful (URL wrapped):

    <URL>
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&
    th=57d63b74cc1d5495&seekm=d2d855ea.0301211618.1a092cdd%40postin
    g.google.com#link11
    </URL>


    HTH
    Yep.
     
    Yann-Erwan Perio, Nov 13, 2003
    #2
    1. Advertising

  3. katherine

    katherine Guest

    Thanks very much Yep.

    I have gone through the correspondance with Richard which was really
    helpful.

    I can't get the script to work with IE 5+ on a Mac though which is my
    main objective.

    Any ideas anyone??

    Thanks very much,

    K
     
    katherine, Nov 14, 2003
    #3
  4. Yann-Erwan Perio wrote:

    > [...] (URL wrapped):
    >
    > <URL>
    > http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&
    > th=57d63b74cc1d5495&seekm=d2d855ea.0301211618.1a092cdd%40postin
    > g.google.com#link11
    > </URL>


    Please do not do this. Fortunately Mozilla/5.0 MailNews does not have
    the OE bug that even URLs are wrapped, so do not try to impose that on
    it. Leave them as they are and they stay functional hyperlinks in most
    newsreaders.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Nov 18, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    1
    Views:
    607
    Larry Barowski
    Jun 27, 2005
  2. hotadvice
    Replies:
    14
    Views:
    708
    hotadvice
    Oct 2, 2007
  3. Andy B.
    Replies:
    0
    Views:
    811
    Andy B.
    Apr 30, 2010
  4. leo
    Replies:
    1
    Views:
    289
    Bob Lehmann
    Dec 5, 2005
  5. Jim
    Replies:
    0
    Views:
    192
Loading...

Share This Page