-
AuthorPosts
-
December 9, 2010 at 10:10 pm #157275
Hi all,
I have a problem with JA MegaMenu – it’s JavaScript error on first loading the page.
Take a look at http://fragrance.stoneshop.bg/ – the error message is this:Message: Object doesn’t support this property or method
Line: 46
Char: 3
Code: 0
URI: http://fragrance.stoneshop.bg/plugins/system/jat3/base-themes/default/js/menu/mega.jsMessage: ‘this.menu’ is null or not an object
Line: 46
Char: 3
Code: 0
URI: http://fragrance.stoneshop.bg/plugins/system/jat3/base-themes/default/js/menu/mega.jsOn line 46 there is:
var images = this.menu.getElements (‘img’);
Any help will be greatly appreciated.
Best Regards
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
December 9, 2010 at 10:28 pm #366047Sorry, I cannot see this error on your page (looking very nice indeed, well done). I’ve tride in IE8 and FF, what browser and when do you see this error?
December 10, 2010 at 7:59 am #366126Thanks 🙂
It’s only on first loading. Try closing your explorer and than open the site again.
I have seen it in IE6, IE8, should be in IE7 too…Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
December 10, 2010 at 8:02 am #366127Just tried in both IE7 and IE8 and just cannot replicate your error. Pease bear in mind IE6 is no longer supported by JA.
Let’s see if anyone else can see your error.
December 10, 2010 at 8:59 am #366136I don’t care about IE6, just saw the error also there 🙂
I found what’s causing the problem.
If I have submenu, type separator with module, loading image inside the error appears.
In this case see second column of “About Us” menu.I’m attaching screenshot of the error also.
December 10, 2010 at 9:20 am #366142I have made some changes to mega,js file:
from
start: function () {
//do nothing if loaded
if (this.loaded) return;this.menu = $(this.menu);
//preload images
var images = this.menu.getElements ('img');
if (images && images.length && !this.imageloaded) {
var imgs = [];
images.each (function (image) {imgs.push(image.src)});
if (imgs.length) {
new Asset.images(imgs, {
onComplete: function(){
this.start();
}.bind(this)
});
this.imageloaded = true;//call this start if cannot load image after sometime
this.start.delay (3000, this);
return ;
}
}to
start: function () {
//do nothing if loaded
if (this.loaded || !$(this.menu)) return;this.menu = $(this.menu);
//preload images
if (!this.menu.getElements ('img')) return;This way it works, but I don’t like losing some code and as I’m not Javascript guru I hope someone will help.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 11, 2010 at 9:06 am #366298Hi Face,
Since you changed the mega.js, I can not see the error again. Look like it only occurs in some cases. We will investigate this error and find the solution. Please update jat3 plugin & ja_t3_blank regularly to have the latest fixes.
December 12, 2010 at 10:11 pm #366448Thanks.
This error appears because it pre-load images in the megamenu. Once they are loaded this error disapears, which is normally.
Regards
May 25, 2011 at 7:52 am #392778Hello ,
I am having same problem when i am accesssing pages linked with component
com_flippingbook.
Because of it drop down does not appear.
Thanks
RajneeshMay 25, 2011 at 8:01 am #392779Please lokke at it here
you can check it here. http://www.solicomaintenance.com/dcd2/ it works
http://www.solicomaintenance.com/dcd2/index.php?option=com_flippingbook&view=book&id=2&page=1&Itemid=255 and not here
thanks
AuthorPostsViewing 10 posts - 1 through 10 (of 10 total)This topic contains 10 replies, has 4 voices, and was last updated by rajneeeshsaini 13 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Megamenu – ‘this.menu’ is null or not an object
Viewing 10 posts - 1 through 10 (of 10 total)