noticeName is set to $( "#form-notice" ); in a global variable. But form-notice is a div that is sent from another ajax request (called before the one above), how can I fill it? Should I use jQuery.on()? How to use it?