I have a id=\"modal\" generated dynamically with the jQuery load() method:
$(\'#modal\').load(\'handl
This is happening because you're adding the input element after you wired up the event. Try .on:
$('body').on('keyup', 'input', function() {
handler = $(this).val();
name = $(this).attr('name');
});
Using .on will make sure the keyup event is wired up to inputs that are on the page originally, as well as any that are added later dynamically.