echo do_shortcode for Contact Form 7 from within dynamically loaded php file

From what you have shown, downloadform.php never loads WordPress, hence naturally do_shortcode() is not available.

You need to implement your AJAX using this Codex article:
http://codex.wordpress.org/AJAX_in_Plugins

Another alternative I would suggest is loading the contact form in a hidden div during the initial page load and then display the hidden div when users click whatever makes the form pop up. That way you don’t need any AJAX at all.