Reputation: 20444
I'm trying to update values of hidden fields with those of their similar inputs. I have missed something as it is not working. Here is the code.
function livecntupdate() {
$('input').each(function(){
$(this).val($('CNT' + this.id).val())
});
}
Marvellous
Upvotes: 1
Views: 141
Reputation: 382746
You are missing hash #
there needed for the id
:
function livecntupdate() {
$('input').each(function(){
$(this).val($('#CNT' + this.id).val())
});
}
Upvotes: 1