View Full Version : Need help duplicating a textarea value

01-27-2006, 07:07 PM
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"?

01-28-2006, 04:04 PM
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:

function email()

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.