I know this question been asked few times before I have been looking at the previous examples but none of them seem to solve my problem. I have two combo boxes 'Clients' and 'Users' when I dropdown the Clients all it's users should load into second dropdown (from database). When I dropdown the 'Clients' I want to pass it's id as parameter in order to get the right users. At alert I'm getting the correct clientId but how can I convert it to java String so it could be passed into jsp. I'm using jQuery and this is what I have so far;
jQuery(function($) {
$('#box1').on('change', function() {
var clientId = $('option:selected', this).val();
alert(clientId);
});
});