Javascipt? Question
Results 1 to 2 of 2

Thread: Javascipt? Question

  1. #1
    Join Date
    Apr 2003

    Javascipt? Question

    i have a text area and i want some buttons above it, when clicked, those buttons will insert stuff into the text area, ie: if u click a button called "Bold", it'll insert into the text area. Anyway i can do this?

  2. #2
    It's a simple event handler. Here's a tutorial on this:

    And here is a working HTML editor in JS that is similar to what I think you want to do:

    <input type="button" value=" Bold " onClick="bold()">
    <input type="button" value=" Italics "
    <input type="button" value=" Underline " onClick="underline()">

    <input type="button" value=" Preformatted " onClick="pre()">

    <input type="button" value=" Center " onClick="center()">

    <input type="button" value=" Horizontal Bar " onClick="hbar()">

    <input type="button" value=" Line Break " onClick="lbreak()">
    <input type="button" value=" Paragraph Break" onClick="pbreak()">

Posting Permissions

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