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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help duplicating a textarea value

    I have a web page that uses form mail. The form mail works nice, but if an area has the name "email", it will take it out of the body of the email it sends and sets that as the return address. This is nice, but I wanted the email value to be in the body, so I changed it to "Email".

    Although, it gets annoying because I created a hidden field with the email value as one of my email addresses. So, whenever I reply to a form mail, I have to change my email to the one in the body.

    Here's my question - how can I use a javascript to take the value typed into the textarea named "Email" and duplicate it as "email"?

  • #2
    New Coder
    Join Date
    Jan 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Posting some of the code would be helpful. I will help when I get a better idea of what you're trying to do.

    I suggest that you write a javascript function that works with the page like so:
    Code:
    function email()
    {
    document.form1.id1.value=document.form1.id2.value
    }
    And have something like this in the body

    <u onmouseover=javascript:email();>Emailhere@someaddress.com</u>


    Perhaps you could also add it to your button.

    <input type=button value="Submit" Submit="whatever" onclick=javascript:email()_>

    I'm not an expert, but hopefully one of these will give you a means of accomplishing what you're trying to accomplish.

    This way you just have to do a mouseover. It's not automatic, but it's faster than what you've been doing.
    Last edited by luckygirl; 01-28-2006 at 04:12 PM.


  •  

    Posting Permissions

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