aspdotnetuser
Programmer
Hi,
I'm new to using Javascript and I'm trying make a function to copy text from one textbox into another when the user clicks a button, I'm using the javascript at the top of .aspx page. Here is the code for the javascript but it doesn't seem to work:
[blue]function button1()
{
var text1value = document.getElementById("text1").value;
var text2value = document.getElementById("text2").value;
document.getElementById("TextBox1").value = text1value;
document.getElementById("TextBox2").value = text2value;
}[/blue]
I'm new to using Javascript and I'm trying make a function to copy text from one textbox into another when the user clicks a button, I'm using the javascript at the top of .aspx page. Here is the code for the javascript but it doesn't seem to work:
[blue]function button1()
{
var text1value = document.getElementById("text1").value;
var text2value = document.getElementById("text2").value;
document.getElementById("TextBox1").value = text1value;
document.getElementById("TextBox2").value = text2value;
}[/blue]