diff --git a/js/webform_ajax.js b/js/webform_ajax.js
index fb32ac0..919715d 100644
--- a/js/webform_ajax.js
+++ b/js/webform_ajax.js
@@ -26,6 +26,9 @@ Drupal.behaviors.webform_ajax = {
 
     // Bind Ajax behaviors to Webform confirmation screen's "Go back to form" link.
     $('.links a:not(.ajax-processed)', context).addClass('ajax-processed').each(function () {
+      // Accounts for other ajax elements that might be on the page.
+      if(typeof wrapper_id === 'undefined') return;
+
       wrapper_id = $(this).parents('[id^=webform-ajax-wrapper]').attr('id');
       setting = settings.webform_ajax.wrappers[wrapper_id];
 
