I am using jQuery to set the value of input box. If I assign the input id with $('#id').val(value) its working properly but I assign the variable then it doesn't work. please help.. my Sample code is
var box = '<?php echo addslashes($box); ?>';
function rowSelect(){
$('#'+box).val(selectedItem);
}
$('#'+box).val(selectedItem);line of code so the issue is either with the value of the variableboxor the value of the variableselectedItem. You will have to show us the code that populates those variables for us to be able to help. Also, I'd suggest you look at the generated HTML (what the browser sees via View/Source in the browser) so you can remove any PHP echo issues from the equation and so we can see what the actual javascript is.