PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Type Error on Ajax pages with Spinner.

  1. fishnyc22
    Member

    I'm currently getting this error when I load a page that has a AJAX confirmation.

    TypeError: 'undefined' is not a function (evaluating 'jQuery('#input_27_6').mask('99999')')

    It also pops up when I submit the form as well. This is the code that is in question:

    <script type='text/javascript'>function gformInitSpinner_27(){jQuery('#gform_27').submit(function(){jQuery('#gform_submit_button_27').attr('disabled', true).after('<' + 'img id="gform_ajax_spinner_27"  class="gform_ajax_spinner" src="http://www.lan.com/onlyinsouthamerica/wp-content/plugins/gravityforms/images/spinner.gif" alt="" />');jQuery('#gform_wrapper_27 .gform_previous_button').attr('disabled', true); jQuery('#gform_wrapper_27 .gform_next_button').attr('disabled', true).after('<' + 'img id="gform_ajax_spinner_27"  class="gform_ajax_spinner" src="http://www.lan.com/onlyinsouthamerica/wp-content/plugins/gravityforms/images/spinner.gif" alt="" />');} );}jQuery(document).ready(function($){gformInitSpinner_27();jQuery('#gform_ajax_frame_27').load( function(){var contents = jQuery(this).contents().find('*').html();var is_postback = contents.indexOf('GF_AJAX_POSTBACK') >= 0;if(!is_postback){return;}var form_content = jQuery(this).contents().find('#gform_wrapper_27');var is_redirect = contents.indexOf('gformRedirect(){') >= 0;jQuery('#gform_submit_button_27').removeAttr('disabled');if(form_content.length > 0){jQuery('#gform_wrapper_27').html(form_content.html());jQuery(document).scrollTop(jQuery('#gform_wrapper_27').offset().top);if(window['gformInitDatepicker']) {gformInitDatepicker();}if(window['gformInitPriceFields']) {gformInitPriceFields();}var current_page = jQuery('#gform_source_page_number_27').val();gformInitSpinner_27();jQuery(document).trigger('gform_page_loaded', [27, current_page]);}else if(!is_redirect){var confirmation_content = jQuery(this).contents().find('#gforms_confirmation_message').html();if(!confirmation_content){confirmation_content = contents;}setTimeout(function(){jQuery('#gform_wrapper_27').replaceWith('<' + 'div id=\'gforms_confirmation_message\' class=\'gform_confirmation_message_27\'' + '>' + confirmation_content + '<' + '/div' + '>');jQuery(document).scrollTop(jQuery('#gforms_confirmation_message').offset().top);jQuery(document).trigger('gform_confirmation_loaded', [27]);}, 50);}else{jQuery('#gform_27').append(contents);if(window['gformRedirect']) gformRedirect();}jQuery(document).trigger('gform_post_render', [27, current_page]);} );} );</script><script type='text/javascript'> jQuery(document).bind('gform_post_render', function(event, formId, currentPage){if(formId == 27) {jQuery('#input_27_6').mask('99999').bind('keypress', function(e){if(e.which == 13){jQuery(this).blur();} } );} } );jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} );</script><script type='text/javascript'> jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [27, 1]) } ); </script>                        </div>

    any ideas whats causing it?

    Posted 12 years ago on Monday August 6, 2012 | Permalink
  2. Please provide a link to your form so we can check this out. It could be due to a theme or plugin conflict. There might be a JavaScript or jQuery error causing a problem with the jQuery that Gravity Forms needs to operate. If you like, you can begin troubleshooting by following these steps http://rkt.gs/testing

    Please provide a link to your form so we can see this in action and help you with a solution.

    Posted 12 years ago on Tuesday August 7, 2012 | Permalink