SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Help....

  1. #1
    SitePoint Member
    Join Date
    Jun 2003
    Location
    dsffds
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help....

    have a form box where users can type text and when they push enter, I want it to insert a certain piece of text...Anybody know how?

  2. #2
    SitePoint Addict
    Join Date
    Aug 2001
    Location
    Los Angeles, CA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's my script I wrote a while back that does this:

    Code:
    <script language="JavaScript">
    function insertIt() {
    document.getElementById("insertText").innerHTML = window.document.form1.textbox1.value;
    }
    </script>
    <BODY>
    <span id="insertText"><BR></span>
    <form name="form1">
    <input type="text" name="textbox1"> <input type="button" value="Insert the text!" OnClick="insertIt()">
    </form>


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
  •