how to insert a HTML form into a javascript popup?

A) It’s not a WP Question as long as it’s not a specific plugin (link?).

B) Do it with jQuery:

var str = <?php echo $user_id.'etc.'; ?>;
var container = jQuery( '#contact_form_popup_id' ).html();
jQuery( container ).text( str );