This is a migrated thread and some comments may be shown as answers.

Concatenate values in text boxes

1 Answer 138 Views
Input
This is a migrated thread and some comments may be shown as answers.
Aneesh
Top achievements
Rank 1
Aneesh asked on 15 Jun 2012, 06:18 AM
I have 3 rad text boxes a,b and c.
How can I get a+b (concatenate strings) when I focus on c.
Thanks...

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 15 Jun 2012, 06:48 AM
Hi Aneesh,

Try the following Javascript to achieve your scenario.

JS:
<script type="text/javascript" >
  function OnFocus(sender, args)
   {
     var a = $find("<%=RadTextBox1.ClientID %>");
     var b = $find("<%=RadTextBox2.ClientID %>");
     sender.set_value(a.get_value() + b.get_value());
   }
</script>

Thanks,
Shinu.
Tags
Input
Asked by
Aneesh
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or