This only adds a listener to the elements that are detected when evaluating the selector:
$('.comment_entry form').submit( ...
Your new form does not exist at the moment, and therefore the listener is not registered.
Use a live delegate instead:
$('#posts').on('submit', '.comment_entry form', function(e) { ... });
source share