Improve Javascript generated for cURL response

* Notice only one popup is generated.
* TODO: create alternative form post page with
modals and formatting of the response.