Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Cancel Buttons not working - TypeError: form.find 01 Mar 2013 03:49 #6879

For those in the same boat...

If you are using the latest version of JQuery, you will find that the Cancel buttons will stop working. This is because of depreciated code in /administrator/components/com_mycomponent/js/jquery.validationEngine.js

It produces the JS error...
TypeError: form.find(...).not(...).die is not a function
The die() method was removed in jQuery 1.9. See jquery.com/upgrade-guide/1.9/#die-removed

Using an older version of jQuery will get you by (version 1.8 )

Or, for an alternative fix, on line 97 and 98 change
form.find("["+options.validateAttribute+"*=validate]").not("[type=checkbox]").die(options.validationEventTrigger, methods._onFieldEvent);
form.find("["+options.validateAttribute+"*=validate][type=checkbox]").die("click", methods._onFieldEvent);

with
form.find("["+options.validateAttribute+"*=validate]").not("[type=checkbox]").off(options.validationEventTrigger, methods._onFieldEvent);
form.find("["+options.validateAttribute+"*=validate][type=checkbox]").off("click", methods._onFieldEvent);
Also, line 101, change
form.die("submit", methods.onAjaxFormComplete);
with
form.off("submit", methods.onAjaxFormComplete);
Admittedly - I don't really understand this code as well as I should - so hopefully I haven't busted something else with this change! Reply back if you know better...

Same sort of issue as
www.j-cook.pro/forum/19-new-tickets/6758...ve-is-not-a-function

and
www.j-cook.pro/forum/18-closed-tickets/6...button-does-not-work
Just call me Chris :)
The following user(s) said Thank You: admin, twev, VeCrea, JoomGuy

Please Log in or Create an account to join the conversation.

Last edit: by organicwebs.

Re: Cancel Buttons not working - TypeError: form.find 01 Mar 2013 14:40 #6883

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
All looks OK to me!

Thanks for sharing @bottomupwebs! Karma++
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The following user(s) said Thank You: organicwebs

Please Log in or Create an account to join the conversation.

Re: Cancel Buttons not working - TypeError: form.find 18 May 2013 19:39 #7206

  • Ferm
  • Ferm's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 6
Thanks for the tip bottomupwebs, it really helped!

In Joomla 2.5, this solves the issue with the cancel button. Using your fixes, I got the cancel buttons to work with JQuery 1.9. I also changed line 28 of /administrator/components/com_mycomponent/js/jquery.validationEngine.js

from

$(".formError").live("click", function() {

to

jQuery(document).on("click",".formerror",function() {

with this change, the validation engine seems to work with jQuery 1.9. Without it, the application runs, but there is no validation.

E
The following user(s) said Thank You: admin, organicwebs

Please Log in or Create an account to join the conversation.

Re: Cancel Buttons not working - TypeError: form.find 05 Aug 2013 22:04 #10693

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.
Coding is now a piece of cake
The following user(s) said Thank You: organicwebs

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.067 seconds
In the begining i would like to say that j-cook is absolutly fantastic tool! And the person who created it is a genius.
Czyżak (Forum)  

Get Started