Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Participant
1065 Points
618 Posts
Mar 29, 2012 02:41 PM|LINK
Hello,
Instead of hardcoding the variable name.. I want to compute it and set teh value..
$('#CR11').val(6);
Instead of above line.. I have to do this..
var inputname = '#' + "CR" + ui.item.id -- which gives '#CR11' $(inputname).val(6);
But its not working.. any ideas?
nissan
Participant
1065 Points
618 Posts
set value for a dynamic input element
Mar 29, 2012 02:41 PM|LINK
Hello,
Instead of hardcoding the variable name.. I want to compute it and set teh value..
$('#CR11').val(6);
Instead of above line.. I have to do this..
var inputname = '#' + "CR" + ui.item.id -- which gives '#CR11'
$(inputname).val(6);
But its not working.. any ideas?