Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with jQuery 3 slim build #541

Open
xkovacikm opened this issue Feb 22, 2018 · 5 comments
Open

Incompatible with jQuery 3 slim build #541

xkovacikm opened this issue Feb 22, 2018 · 5 comments

Comments

@xkovacikm
Copy link

Hey there,

I've got the problem with this package while using Jquery 3.2.1.
function ajaxForm is giving me an error: Cannot read property 'success' of undefined.

Someone on stackoverflow explained it there:
https://stackoverflow.com/questions/45655409/website-using-jquery-form-version-4-2-2-and-jquery-3-

jQuery v3 introduces a lot of sweeping chances: one of which is the removal of the jqXHR.success() callback (it has been deprecated since v1.8, but many authors don't seem to bother to migrate/update). The plugin is obviously not updated to listen to resolution of promise using the jqXHR.done() callback.

Is there any chance to fix this problem?

Thank you ;)

@kevindb
Copy link
Contributor

kevindb commented Feb 23, 2018

Instructions for Reporting a Bug
Would you please create an example of the error on JSFiddle or CodePen so that others can reproduce the issue you're seeing?

@xkovacikm
Copy link
Author

https://jsfiddle.net/v9mrjr7o/2/ (you have to open developer console and then try to submit form)

But in description is already explained what could be wrong.

jQuery v3 introduces a lot of sweeping chances: one of which is the removal of the jqXHR.success() callback (it has been deprecated since v1.8, but many authors don't seem to bother to migrate/update). The plugin is obviously not updated to listen to resolution of promise using the jqXHR.done() callback. Your best best is to revert to jQuery v2 or lower. – Terry Aug 12 '17 at 22:28

Thank you!

@xkovacikm
Copy link
Author

I am sorry, my bad.

It's probably not working only with Jquery 3 Slim

@kevindb kevindb changed the title This package is incompatible with Jquery 3+ Incompatible with jQuery slim build Feb 26, 2018
@kevindb
Copy link
Contributor

kevindb commented Feb 26, 2018

Using the JSFiddle you provided, I'm unable to recreate your original error
Cannot read property 'success' of undefined
Instead, I see the following error in my Chrome console:
Uncaught ReferenceError: opciones is not defined at window.onload

If I remove the opciones variable being passed into the ajaxForm() function on line 6, the form 'submits' successfully and displays the JS alert "wow".

Would you please update the JSFiddle to display the Cannot read property 'success' of undefined error?

@kevindb kevindb changed the title Incompatible with jQuery slim build Incompatible with jQuery 3 slim build Feb 26, 2018
@xkovacikm
Copy link
Author

I am so sorry. That JSFiddle example wasn't properly saved.
https://jsfiddle.net/v9mrjr7o/7/

this one is ok. Sorry once again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants