Writing To Text Area.

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

    #1

    Writing To Text Area.


    Greetings,

    I trying to but buttons for the users to write special characters to a
    text area in a form by clicking in a button.


    <form name="form1" onSubmit="retur n (function1() && function2() &&
    function3();">
    <textarea name=t1> </textarea>
    <input type=submit value="ƒ">
    <input type=submit value="¼">
    <input type=submit value="÷">
    <input type=submit value="µ">


    </form>
    <script language="JavaS cript"><!--
    function functionName1() {
    window.document .form1.t1.value = 'ƒ';
    return false;
    }
    function functionName2() {
    window.document .form1.t1.value = '¼';
    return false;
    }
    function functionName3() {
    window.document .form1.t1.value = '÷';
    return false;
    }
    function functionName4() {
    window.document .form1.t1.value = 'µ';
    return false;
    }

    //--></script>



    Clicking on any button doesn't do anything but if I put just one button
    it works, can anyone suggest what did I do wrong?

    Thank you for your help.

  • ASM

    #2
    Re: Writing To Text Area.

    Adam a ecrit :[color=blue]
    >
    > I trying to but buttons for the users to write special characters to a
    > text area in a form by clicking in a button.[/color]

    and by very simple way and cheap code ?

    <form>
    Help for exoctic caracters : click on button to add its value<br>
    <input type=button value="ƒ" onclick="t1.val ue+=this.value; ">
    <input type=button value="*" onclick="t1.val ue+=this.value; ">
    <input type=button value="÷" onclick="t1.val ue+=this.value; ">
    <input type=button value="µ" onclick="t1.val ue+=this.value; "><br>
    <textarea name=t1> </textarea>
    </form>

    --
    *************** *************** *************** **********
    Stéphane MORIAUX et son vieux Mac
    Aide Pages Perso (images & couleurs, formulaire, CHP)

    *************** *************** *************** **********

    Comment

    • Adam

      #3
      Re: Writing To Text Area.

      On Tue, 07 Jun 2005 23:29:57 +0200, ASM
      <stephaneOTEZ_M OImoriaux@wanad oo.fr> wrote:
      [color=blue]
      >Adam a ecrit :[color=green]
      >>
      >> I trying to but buttons for the users to write special characters to a
      >> text area in a form by clicking in a button.[/color]
      >
      >and by very simple way and cheap code ?
      >
      ><form>
      >Help for exoctic caracters : click on button to add its value<br>
      ><input type=button value="ƒ" onclick="t1.val ue+=this.value; ">
      ><input type=button value="*" onclick="t1.val ue+=this.value; ">
      ><input type=button value="÷" onclick="t1.val ue+=this.value; ">
      ><input type=button value="µ" onclick="t1.val ue+=this.value; "><br>
      ><textarea name=t1> </textarea>
      ></form>[/color]

      Thank you, thank you, thank you, thank you, thank you.

      It works as expected, more efficient that I ever can be.

      I didn't say it before, thank you. :)


      Comment

      Working...