Ajax on a webform affecting comment form and user-registration form
The problem can be that ajax functionality is attached to button by its id attribute. Seems all three buttons - for webform, comment and user-register have the same id "edit-submit".

To fix this - just add unique id for webform submit button.

function alterwebform_form_alter(&amp;$form, &amp;$form_state, $form_id) {

//see if webform_client_form_ is in the form_id
if(strstr($form_id, 'webform_client_form_')) {  

  //get the nid so we can use it in the wrapper value
   $nid = $form['#node']-&gt;nid;

    $form['actions']['submit']['#ajax'] = array(
        'callback' =&gt; 'alterwebform_webform_js_submit',
        'wrapper' =&gt; 'webform-client-form-' . $nid,
        'method' =&gt; 'replace',
        'effect' =&gt; 'fade',

    );
    // Add unique id for submit button.
    $form['actions']['submit']['#id'] = 'webform-client-form-submit-' . $nid;

    $form['#validate'] []='alterwebform_test';
  }
}