Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] ERROR: "TypeError: el.attr is not a function"

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

  • Tomaselli
  • Tomaselli's Avatar
  • Offline
  • Elite Member
  • Posts: 293
  • Thank you received: 87
  • Karma: 46
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.
Last Edit: 12 Aug 2012 08:41 by admin.
The administrator has disabled public write access.

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

  • Creb
  • Creb's Avatar
  • Offline
  • Junior Member
  • Posts: 20
  • Thank you received: 1
  • Karma: 0
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
The administrator has disabled public write access.

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

  • Tomaselli
  • Tomaselli's Avatar
  • Offline
  • Elite Member
  • Posts: 293
  • Thank you received: 87
  • Karma: 46
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.
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
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
The administrator has disabled public write access.

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

  • Tomaselli
  • Tomaselli's Avatar
  • Offline
  • Elite Member
  • Posts: 293
  • Thank you received: 87
  • Karma: 46
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?
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
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
Last Edit: 01 Aug 2012 10:54 by admin.
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
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 administrator has disabled public write access.
The following user(s) said Thank You: twev

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

  • edwardcox
  • edwardcox's Avatar
  • Offline
  • Premium Member
  • Here to help.
  • Posts: 131
  • Thank you received: 26
  • Karma: 12
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.
The administrator has disabled public write access.
Time to create page: 0.101 seconds

Get Started