Button in form not working properly
You need Simple Drupal AJAX load with jQuery and delivery callback  which is explained in  5 simple steps this page.

So include a anchor link through the form alter and have the link render the content through attached javascript file through jQuery.load() function.

To attach js file, 

$form['#attached']['js'][] = array(
  'data' =&gt; drupal_get_path('module', 'module_name') . '/some_file.js',
  'type' =&gt; 'file', 
);


For Drupal ajax forms refer this official documentation.