Support Forum

  • Page:
  • 1

moo_faq.js error

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hello, I've this strange error (retrieved with firebug):



tog has no properties

[Break on this error] tog.addClass('selected');



at line 10 of moo_faq.js





The result is that (tried only with ff) every content get hidden (it's there, I see it if I look at html source), but is not displayed.



I mean the main content of each page, header, footer, left and right modules all display correctly.



I've no other js loaded (well in docman section there's docman js, but other pages don't use js.



It's a template made by myself.



Any hint?



Thanks



(I'll be away for the week end so I will cannot reply).
  • Jared's Avatar
  • Jared
  • Free Extensions
  • 4 posts
  • Karma: 0
The administrator has disabled public write access.
Hi There,



Do you have a link so I can see whats going on?



Thanks,



Anthony.
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Hello, sorry for late reply, I were in Rome for first Joomladay Italy :P



and the journey to come back (I'm more than 600 km far from Rome) was a big trouble :S



then I had to replicate the issue on our own development server since I'm not allowed to post the url for client development server.



Here is (at a very pre pre alpha level) the site.



sviluppo.atfriends.net/timpani/index.php?option=com_content&task=view&id=10&Itemid=14



this is the link to the faq page.



Well, this is a project where I 'integrated' Joomla with Zen Cart (not users, but a lot of other things), you may with ease understand which links are within joomla and which leads to Zen Cart (simply looking at how are written these links)



Each joomla page now is void, but if I remove this line





Edit: hmmm... ok, the line where is included moo_faq.js



from the template, the pages start working again as they should.



As you may see, there's no other js, so no js conflict issue.



Thanks in advance if you may find the time to take a look.
  • Jared's Avatar
  • Jared
  • Free Extensions
  • 4 posts
  • Karma: 0
The administrator has disabled public write access.
Hi there,



I just checked your source but couldnt find the js at the bottom of the page.



[code:1]window.onload = function() {



// Pick your classes

var myBox = document.getElementsByClassName('box_title');

var myBoxOpen = document.getElementsByClassName('information');



// Create the accordion

var myAccordion = new fx.Accordion(

myBox, myBoxOpen, {

onActive: function(tog){

tog.setStyles({color: '#435E27'});

},

onBackground: function(tog){

tog.setStyles({color: '#000'});

},

alwaysHide: true

}

);

}[/code:1]



Im not sure if this is what's causing the error but is certainly necessary to get the module working properly.



Let me know how you get on.



Thanks Anthony.
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
uhm... I put it, but nothing changed.



Now I'll search a bit, but since the content is there, I suppose the problem may regards css (it's the same as if I had .content set as no-display).



Another question: why I hadn't the code you told me to put in? If I missed something like that, maybe I could have missed something else...
  • Jared's Avatar
  • Jared
  • Free Extensions
  • 4 posts
  • Karma: 0
The administrator has disabled public write access.
My apologies I had forgotten that I had packed that js up into the moo_faq.js file. I was looking at the demo site which uses a different version.



I think you are on to something there in terms of the content being subjected to a display:none rule.



I could see it on the page on your website but it may be that I looked at a non-joomla page or something ... anyway, the faq uses a div called content which has the attribute display:none which then gets changed when the question is clicked.



Do you have any divs in the template that use the .content class?



Thanks Anthony.
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Thanks Anthony,



in effect I had a class 'content' (I modified its name in css, but not in index file of the template). Now the pages display correctly, not the faq, but since I made a lot of try, it could be something 'dirty' I left in.



Since in the meanwhile I was trying another faq system and got it working, having absolutely no time to investigate, I must go on with the other way.



Thanks for your help and maybe, if I'm allowed to suggest, in next version you could change your classes names adding bamboo_ or similar, this way being sure to avoid conflicts with common names.



Bye
  • Jared's Avatar
  • Jared
  • Free Extensions
  • 4 posts
  • Karma: 0
The administrator has disabled public write access.
Thanks for that ... Ill update the class names in the next version.



Anthony.
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers