Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Help On Forms

  1. #1
    New Coder
    Join Date
    Dec 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help On Forms

    This is the form that I need (passing text values)
    Is it possible to pass the value to any of the Textareas I would like to in my page. or for Example:
    Lets say I click on the textarea
    and I want to pass my buttom value like this:

    my text [ buttom value] area

    <form name="TA">
    <input type="button" value="1" name="B1" onclick="document.TA.A.value+=this.value">
    <input type="button" value="2" name="B2" onclick="document.TA.A.value+=this.value">
    <textarea name="A" cols="20" rows="3" >my text area</textarea>
    </form>

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You've lost me
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You're wanting to add the value declared for the button to the end of whatever value is in the Textarea right?

    Try this:

    Code:
    <form name="TA"> 
    <input type="button" value="1" name="B1" onclick="this.form.A.value=this.form.A.value + this.value"> 
    <input type="button" value="2" name="B2" onclick="this.form.A.value=this.form.A.value + this.value"> 
    <textarea name="A" cols="20" rows="3" >my text area</textarea> 
    </form>


  •  

    Posting Permissions

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