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

TOPIC:

[FIXED] ERROR: "TypeError: el.attr is not a function" 01 Aug 2012 07:16 #2940

I just downloaded a new built of my component and I get this error with firebug on the EDIT ITEM PAGE, when I click on the cancel button, and the page doesn't go anywhere.
I guess it's because I'm using jquery in my component.

it's a javascript error in the formvalidator.

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

Last edit: by admin.

Re: ERROR: "TypeError: el.attr is not a function" 01 Aug 2012 07:28 #2941

  • Creb
  • Creb's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 20
  • Thank you received: 1
Hello, I tha same error :(
j 1.7.3


TypeError: el.attr is not a function
Plik źródłowy: igpatest.investin.pl/administrator/compo.../js/formvalidator.js
Wiersz: 633

Regards
Creb

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

Re: ERROR: "TypeError: el.attr is not a function" 01 Aug 2012 07:37 #2942

I found a quick and very dirty fix to this, until the Admin will fix the bug.

just replace the formvalidator.js in the JS folder of your component with an old release of the same file.

ATTENTION!!!
by the way it's not tested, It worked at first sight but I didn't test in all the scenarios.

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

Re: ERROR: "TypeError: el.attr is not a function" 01 Aug 2012 09:45 #2948

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Mootools is really boring !!
And Joomla formvalidator too !

As an announcements, V2.0 is containing a jQuery formvalidator.
posabsolute.github.com/jQuery-Validation-Engine/

For all users of jQuery, you can already try to implement it, it is the future of Cook.

The native MooTools validator will be totally avoided because it has created too much issues here on the forum, and with IE, jQuery...
This same native validator does not support a lot of controls, such checkboxes, radio, etc..

So, V2.0 (and maybe even before), will not use anymore the native one.
Sooo bored.

jQuery is nice, and Cook is going to it.
MooTools is about to be deprecated in cook.


So to answer this topic, I have no answer right now.
My answer will be the coming of this jQuery plugin (wich is already working now for V2)
It is possible I try to implement it in this current version.

Who wants ??
Coding is now a piece of cake

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

Re: ERROR: "TypeError: el.attr is not a function" 01 Aug 2012 10:39 #2949

I would remove COMPLETELY the mootools from joomla!
and actually this is what I do on all my websites!

I agree with you Admin.

but I have a question, if you are going to use the Jform on the cook v2.0, do you think there will be problems?

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

Re: ERROR: "TypeError: el.attr is not a function" 01 Aug 2012 10:53 #2950

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
JForms is very nice and already implemented in V2.0 (local)

One thing very nice is the possibility to merge JS and PHP validations.
The XML way of creating the forms is good also (names of vars, languages, ...) So the developper access only to the most useful params in a short way.


BUT :
JForms do not implement JS validator properly (dynamic creation of JS validation rules, and other stuffs missing)
It lacks also when you want to fill list with dynamic datas coming from the caller (VIEW)
You must create a field (whith SQL) for each different data (I do not like)
It works only in forms (not in filters, or anywhere else), so it is boring to recreate the groupings on the lists for example.


SO :
- Cook will still continue to use JDom ;-)
- Cook will override some usefull things in JForms
- Cook will implement jQuery ONLY (in close future)

If you look in (joomla/html/html/behavior.php), you can see that behaviors::mootools() is deprecated to behaviors::framework(), wich means that is becomes opened a little bit.

But JHtml is full of mootools, so JDom is kept for cross frameworks.

V2.0 will be a mix of both at the beginning (sorry, but the long is the road)
Coding is now a piece of cake

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

Last edit: by admin.

Re: ERROR: "TypeError: el.attr is not a function" 08 Aug 2012 15:17 #3069

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed with jQuery !

You can now implement jQuery in your component.
1. Go in the new 'Config' tab.
2. Choose jQuery


Enjoy ;-)

www.j-cook.pro/news/news
Coding is now a piece of cake
The following user(s) said Thank You: twev

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

Re: ERROR: "TypeError: el.attr is not a function" 08 Aug 2012 22:14 #3082

Amazing! Thanks once again Jocelyn for bringing us closer to 2.0 with JQuery.

Please know that I appreciate your hard work and awesome Cook Self Service. Keep up the great work!

Edward.
Passionate Joomla! Developer and J-Cook pro evangelist.
www.jcombuilder.com - we build great Joomla!® Components so you don't have to.

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

  • Page:
  • 1
Time to create page: 0.069 seconds

  Joomla Developpers won't be able to live without J-Cook's Component Creator! Check it out - it'll save you a heap of time coding so you can concentrate on the creative part of developing!
Mind-Your-Biz-Online

Get Started