Click here to Skip to main content
15,917,061 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have two text boxes
textbox1 and textbox2
Posted
Comments
Thanks7872 28-Aug-13 4:55am    
Than what? What have you tried?
Mann Rai 28-Aug-13 6:11am    
my problm has been solved

1 solution

As you have described,i am having two text boxes along with a button as below

XML
<input type="text" id="FirstTextBox" />
<input type="text" id="SecondTextBox" />
<input type="button" id="TransferButton" value="Click Me!" />


javascript for clear textbox values after transfering textbox values to other text box

JavaScript
$(document).ready(function(){
   $("#TransferButton").click(function () {
        var collectedValue = $("#FirstTextBox").val();
        $("#FirstTextBox").val("");
        $("#SecondTextBox").val(collectedValue);
    });
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900