hi
there is TxtPhone and LblTshE in LblTshE will display count of number that users will typed into Txtphone below is code:
<script type="text/javascript">
$(function () {
$('[id*=TxtPhone]').on("keyup", function () {
var numbers = $(this).val().split(/\n/g);
var count = 0;
for (var i = 0; i < numbers.length; i++) {
if (numbers[i].trim() != '') {
count++;
}
}
$('[Id*=LblTshE]').html(count);
});
});
</script>
now I want save LblTshE's value into hidenfield so I change code like below:
<script type="text/javascript">
$(function () {
$('[id*=TxtPhone]').on("keyup", function () {
var numbers = $(this).val().split(/\n/g);
var count = 0;
for (var i = 0; i < numbers.length; i++) {
if (numbers[i].trim() != '') {
count++;
}
}
$('[Id*=LblTshE]').html(count);
$('[id*=hfCount]').html($('[Id*=LblTshE]').html(count));
});
});
</script>
but it doesn't work
It doesn't show any thing in LblTshE
how I can save LblTshE's value into hiddenfield
Best regards
neda