X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Categories menu flyout - hide dropdowns (https://forum.x-cart.com/showthread.php?t=22597)

NightFire 06-19-2006 04:57 AM

Categories menu flyout - hide dropdowns
 
Hi All,

At one of our sites we're using a css style for our categories. Not the fancy categories but pure css.
In firefox this menu for the categories is working perfect, but in internet explorer the dropdown boxes of the products are displaying trough the menu's.
See screenshot:

http://img215.imageshack.us/img215/6035/cssmenutm5dk.jpg

Anyone an idea how to fix this?

B00MER 06-21-2006 12:35 AM

A Not so simple fix:

Edit skin1/modules/Fancy_Categories/(style)/menumanagement.js Add this function at the bottom of the file:
Code:

function hideSelects(action) {
//documentation for this script at http://www.shawnolson.net/a/1198/
//possible values for action are 'hidden' and 'visible'
if (action!='visible'){action='hidden';}
if (navigator.appName.indexOf("MSIE")) {
for (var S = 0; S < document.forms.length; S++){
for (var R = 0; R < document.forms[S].length; R++) {
if (document.forms[S].elements[R].options) {
document.forms[S].elements[R].style.visibility = action;
}
}
}
}
}


Next within the same file search for:
Code:

hideMenu(menuId,submenuId);

AFTER this line add:
Code:

hideSelects('hidden');

Next still within the same file search for:
Code:

menuObj.layer.hide();

AFTER this line add:
Code:

hideSelects('visible');

Search again for:
Code:

menuObj.layer.hide();

and add another entry AFTER it:
Code:

hideSelects('visible');

This will remove all Dropdown selectors from the page if the fancy categories are being used, returning once the user is not mousing over them.

Personally I think this should be standard in Fancy Categories. :roll:

I'm gonna move this to Custom Mods area as well. :wink:

NightFire 06-21-2006 12:48 AM

Thanks B00MER for the fix. I think alot of people using the fancy cats will like this fix. But unfortunately I'm not using the fancy cats, its slows the site down. Thats why I'm using a pure css menu, not the fancy cats. Maybe I didn't clarify that clearly enough in my first post.

As I'm using pure css, is there also a fix like that to solve this problem?

Thanks.

B00MER 06-21-2006 12:58 AM

Quote:

Originally Posted by NightFire
Thanks B00MER for the fix. I think alot of people using the fancy cats will like this fix. But unfortunately I'm not using the fancy cats, its slows the site down. Thats why I'm using a pure css menu, not the fancy cats. Maybe I didn't clarify that clearly enough in my first post.

As I'm using pure css, is there also a fix like that to solve this problem?

Thanks.


Javascript is the only approach to disable this so you'll need to use the onMouseOver & onMouseOut javascript handlers in your CSS HTML tags (probably div's?) to hide the dropdowns accordingly.

I would agree, Fancy Cats adds HUGE amount of overhead, especially in filesize if you have a large category taxonmy. Not to mention the adverse effects it will have on Search Spiders. :cry:

PhilJ 06-21-2006 12:04 PM

Niki, I'll try and fix this in the next version.

It's an IE only problem... the solution is to put an IFRAME behind the DIV layer.

More info...
http://weblogs.asp.net/bleroy/archive/2005/08/09/422047.aspx

webtron 07-12-2006 09:53 PM

Has this been fixed if I was to buy the fancy category addon from x-cart?

B00MER 07-12-2006 11:09 PM

Quote:

Originally Posted by webtron
Has this been fixed if I was to buy the fancy category addon from x-cart?


Not that I'm aware of. Just use the code I posted previously if not.

webtron 07-13-2006 06:13 PM

Thanks Boomer. Will take a look at it.


All times are GMT -8. The time now is 06:45 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.