SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    trying to edit this script so that it adds text to two textareas in the same form

    anyone know how i could edit this script so that it adds text (bold, italic, etc) to two textareas in the same form

    at the moment, it only seems to add the text to the first textarea, and the most descriptive names werent used so im having a hard time figuring this out

    http://www.board-source.com/wysiwyg.html

    thanks

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The script is designed to work on one form; it finds the textarea by the name 'code'. What you need to do is redesign it so that AddText takes the textarea as a parameter instead of the form:

    Code HTML4Strict:
    <input type="button" onclick="AddText(this.form.code,1);" value="big"/>

    And change the value directly:
    Code JavaScript:
    form.value+=AddTxt;
    lixlpixel_live_preview(form.value);
    form.focus();
    Saul


Bookmarks

Posting Permissions

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