it should still fix some issue Just give all elements a class and thus have one event listener to all changes/keyup from that class elements. Then you can choose if you want the filename to be populated as you are typing keystorkes (i.e: keyup()) or after you have left the textbox (i.e: `.change() ).
// if you want, you may use [ $().change() ] instead of [ $().keyup() ]
var a = $('#elementA').val();
var b = $('#elementB').val();
var c = $('#elementC').val();
$('#filename').val(a + ' ' + b + ' ' + c);