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.

Problem With & Solution To Ajax Submit in IE8

  1. Ran into a problem with IE8 and ajax form submission where it was kicking out an "error, object expected" every time. After many hours of digging through the code I figured out the issue.

    Short version is that the way it was written, when you first load a page with a form it gets output on the page. When you submit via ajax, the request goes back to that same form function, and checks to see what the result is. The result is passed to a hidden div, then that content is used to replace the existing form HTML.

    The issue is that what is being passed to the iframe INCLUDES the jquery call to make it all work, wrapped in a document.ready() call. When it is passed to the iframe, IE8 doesn't see jquery as being loaded -- it treats the iframe like a totally separate page. The solution was to split the jquery stuff out on ajax pages so that it is loaded only the first time the page is loaded, and all that is sent to the iframe is the actual form.

    Too long to paste it in here and I don't see any option for attaching a file, so I'm putting it on my site for anyone who needs it. Hopefully the team here will incorporate the changes, or come up with something better.

    http://newportcreativegroup.com/blog/2010/12/07/gravity-forms-ajax-submits-fails-in-ie-heres-the-fix/

    Posted 9 years ago on Wednesday December 8, 2010 | Permalink
  2. Thanks @newport. I will incorporate that fix into 1.5

    Posted 9 years ago on Wednesday December 8, 2010 | Permalink