SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2005
    Location
    Bunion Town
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Simple Script Help

    Hi, i would like to simply create a text box for people to enter text in javascript. 400 by 80 pixels. There will be 14 buttons below it, 13 of them inserting a short word into the text box when each is clicked. The 14th needs to be a copy button which copies the entire text so it can be pasted. I am a very begginer but i have created this: The text box is not 400 pixels long, it is much longer. How can i make it 400 by 80 pixels? How do i make buttons which insert text into the box, like on this forum when you press the insert code tag button? I have made a second box for a number to be put in. Is it possible that when one of the buttons is pressed it could insert this number into the main text box?
    Thanks if anyone can help!

    <FORM NAME = advert creator>

    Advert: <INPUT TYPE = Text NAME = txtFirstNumber SIZE = 400 value ="">
    Number: <INPUT TYPE = Text NAME = txtFirstNumber SIZE = 5 value ="">
    <Input Type = Button NAME = b1 VALUE = "Copy Text" onClick = copytext()>

    </FORM>

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am a very begginer
    Then try to pick beginner scripts to write.

    The text box is not 400 pixels long, it is much longer. How can i make it 400 by 80 pixels?
    That's an html question and doesn't have anything to do with javascript. Search 'html forms' on google and specifically look at 'textareas'.


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
  •